Skip to content

Commit

Permalink
add move
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-hitonami committed Sep 28, 2022
1 parent 42b4031 commit a5961db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions taichi/codegen/llvm/codegen_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ void TaskCodeGenLLVM::visit(AssertStmt *stmt) {
#endif
arguments, {tlctx->get_constant(0), tlctx->get_constant(0)}));

llvm_val[stmt] = call("taichi_assert_format", args);
llvm_val[stmt] = call("taichi_assert_format", std::move(args));
}

void TaskCodeGenLLVM::visit(SNodeOpStmt *stmt) {
Expand Down Expand Up @@ -1667,7 +1667,7 @@ llvm::Value *TaskCodeGenLLVM::call(
func_arguments.insert(func_arguments.end(), arguments.begin(),
arguments.end());

return call(prefix + "_" + method, func_arguments);
return call(prefix + "_" + method, std::move(func_arguments));
}

llvm::Function *TaskCodeGenLLVM::get_struct_function(const std::string &name,
Expand Down Expand Up @@ -2475,7 +2475,7 @@ void TaskCodeGenLLVM::visit(InternalFuncStmt *stmt) {
for (auto s : stmt->args) {
args.push_back(llvm_val[s]);
}
llvm_val[stmt] = call(stmt->func_name, args);
llvm_val[stmt] = call(stmt->func_name, std::move(args));
}

void TaskCodeGenLLVM::visit(AdStackAllocaStmt *stmt) {
Expand Down
2 changes: 1 addition & 1 deletion taichi/codegen/llvm/llvm_codegen_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class LLVMModuleBuilder {
llvm::FunctionType *func_ty,
std::vector<llvm::Value *> args) {
check_func_call_signature(func_ty, func->getName(), args, builder);
return builder->CreateCall(func_ty, func, args);
return builder->CreateCall(func_ty, func, std::move(args));
}

llvm::Value *call(
Expand Down

0 comments on commit a5961db

Please sign in to comment.