Commit 03a59bc9 by Yuanqiang Liu Committed by Tianqi Chen

[Codegen] fix bug on LLVM 10.0 (#4480)

parent 3fa80975
...@@ -276,7 +276,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) { ...@@ -276,7 +276,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_ObjectFile"; << "Cannot emit target CGFT_ObjectFile";
#else #else
CHECK(tm->addPassesToEmitFile( CHECK(tm->addPassesToEmitFile(
pass, destObj, nullptr, llvm::CGFT_ObjectFile) == 0) pass, destObj, nullptr, llvm::TargetMachine::CGFT_ObjectFile) == 0)
<< "Cannot emit target CGFT_ObjectFile"; << "Cannot emit target CGFT_ObjectFile";
#endif #endif
pass.run(*mObj); pass.run(*mObj);
...@@ -293,7 +293,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) { ...@@ -293,7 +293,7 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#else #else
CHECK(tm->addPassesToEmitFile(passAsm, destAsm, nullptr, CHECK(tm->addPassesToEmitFile(passAsm, destAsm, nullptr,
llvm::CGFT_AssemblyFile) == 0) llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#endif #endif
passAsm.run(*mAsm); passAsm.run(*mAsm);
......
...@@ -245,7 +245,7 @@ runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) { ...@@ -245,7 +245,7 @@ runtime::Module BuildNVPTX(Array<LoweredFunc> funcs, std::string target) {
<< "Cannot emit target CGFT_ObjectFile"; << "Cannot emit target CGFT_ObjectFile";
#else #else
CHECK(tm->addPassesToEmitFile( 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"; << "Cannot emit target CGFT_ObjectFile";
#endif #endif
pass.run(*module); pass.run(*module);
......
...@@ -97,7 +97,7 @@ class LLVMModuleNode final : public runtime::ModuleNode { ...@@ -97,7 +97,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_ObjectFile"; << "Cannot emit target CGFT_ObjectFile";
#else #else
CHECK(tm_->addPassesToEmitFile( CHECK(tm_->addPassesToEmitFile(
pass, dest, nullptr, llvm::CGFT_ObjectFile) == 0) pass, dest, nullptr, llvm::TargetMachine::CGFT_ObjectFile) == 0)
<< "Cannot emit target CGFT_ObjectFile"; << "Cannot emit target CGFT_ObjectFile";
#endif #endif
pass.run(*m); pass.run(*m);
...@@ -119,7 +119,7 @@ class LLVMModuleNode final : public runtime::ModuleNode { ...@@ -119,7 +119,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#else #else
CHECK(tm_->addPassesToEmitFile( CHECK(tm_->addPassesToEmitFile(
pass, dest, nullptr, llvm::CGFT_AssemblyFile) == 0) pass, dest, nullptr, llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#endif #endif
pass.run(*m); pass.run(*m);
...@@ -166,7 +166,7 @@ class LLVMModuleNode final : public runtime::ModuleNode { ...@@ -166,7 +166,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#else #else
CHECK(tm_->addPassesToEmitFile( CHECK(tm_->addPassesToEmitFile(
pass, rso, nullptr, llvm::CGFT_AssemblyFile) == 0) pass, rso, nullptr, llvm::TargetMachine::CGFT_AssemblyFile) == 0)
<< "Cannot emit target CGFT_AssemblyFile"; << "Cannot emit target CGFT_AssemblyFile";
#endif #endif
pass.run(*m); pass.run(*m);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment