Skip to content

Commit

Permalink
[bugfix] fix the undeclared identifier 'f' (apache#14879)
Browse files Browse the repository at this point in the history
* fix the undeclared identifier 'f'

* Update codegen_cpu.cc
  • Loading branch information
jikechao authored and mei-ye committed Jun 1, 2023
1 parent cfa0fe8 commit 87ec2b3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/target/llvm/codegen_cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,7 @@ llvm::Value* CodeGenCPU::CreateCallExtern(Type ret_type, String global_symbol,
if (callee->getType() != ftype->getPointerTo()) {
callee = builder_->CreatePointerCast(callee, ftype->getPointerTo());
}

#if TVM_LLVM_VERSION >= 90
auto ext_callee = llvm::FunctionCallee(ftype, callee);
#else
auto ext_callee = f;
#endif
return builder_->CreateCall(ext_callee, arg_values);
return builder_->CreateCall(ftype, callee, arg_values);
}

llvm::GlobalVariable* CodeGenCPU::InitContextPtr(llvm::Type* p_type, std::string name) {
Expand Down

0 comments on commit 87ec2b3

Please sign in to comment.