Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Codegen] fix bug on LLVM 10.0 #4480

Merged
merged 1 commit into from
Dec 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/codegen/llvm/codegen_amdgpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_ObjectFile";
#else
CHECK(tm->addPassesToEmitFile(
pass, destObj, nullptr, llvm::CGFT_ObjectFile) == 0)
pass, destObj, nullptr, llvm::TargetMachine::CGFT_ObjectFile) == 0)
<< "Cannot emit target CGFT_ObjectFile";
#endif
pass.run(*mObj);
Expand All @@ -293,7 +293,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_AssemblyFile";
#else
CHECK(tm->addPassesToEmitFile(passAsm, destAsm, nullptr,
llvm::CGFT_AssemblyFile) == 0)
llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile";
#endif
passAsm.run(*mAsm);
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/llvm/codegen_nvptx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_ObjectFile";
#else
CHECK(tm->addPassesToEmitFile(
pass, dest_ptx, nullptr, llvm::CGFT_AssemblyFile) == 0)
pass, dest_ptx, nullptr, llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_ObjectFile";
#endif
pass.run(*module);
Expand Down
6 changes: 3 additions & 3 deletions src/codegen/llvm/llvm_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_ObjectFile";
#else
CHECK(tm_->addPassesToEmitFile(
pass, dest, nullptr, llvm::CGFT_ObjectFile) == 0)
pass, dest, nullptr, llvm::TargetMachine::CGFT_ObjectFile) == 0)
<< "Cannot emit target CGFT_ObjectFile";
#endif
pass.run(*m);
Expand All @@ -119,7 +119,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_AssemblyFile";
#else
CHECK(tm_->addPassesToEmitFile(
pass, dest, nullptr, llvm::CGFT_AssemblyFile) == 0)
pass, dest, nullptr, llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile";
#endif
pass.run(*m);
Expand Down Expand Up @@ -166,7 +166,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_AssemblyFile";
#else
CHECK(tm_->addPassesToEmitFile(
pass, rso, nullptr, llvm::CGFT_AssemblyFile) == 0)
pass, rso, nullptr, llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile";
#endif
pass.run(*m);
Expand Down