diff options
author | Samuel Pitoiset <[email protected]> | 2019-11-14 10:04:29 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-11-14 14:41:55 +0000 |
commit | ee9811a0bb86d3d75fafeece368f6182048807d0 (patch) | |
tree | c38563d8ebd7142dfc62ee116fad95db93b06cff | |
parent | 94cb4916e3832d61c8899afeb2ec007e1075ded1 (diff) |
ac: fix build with recent LLVM
Build is broken since "Move CodeGenFileType enum to Support/CodeGen.h".
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
-rw-r--r-- | src/amd/llvm/ac_llvm_helper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp index 7f3ff71fd9c..5bd7453b508 100644 --- a/src/amd/llvm/ac_llvm_helper.cpp +++ b/src/amd/llvm/ac_llvm_helper.cpp @@ -192,7 +192,11 @@ struct ac_compiler_passes *ac_create_llvm_passes(LLVMTargetMachineRef tm) if (TM->addPassesToEmitFile(p->passmgr, p->ostream, nullptr, +#if LLVM_VERSION_MAJOR >= 10 + llvm::CGFT_ObjectFile)) { +#else llvm::TargetMachine::CGFT_ObjectFile)) { +#endif fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n"); delete p; return NULL; |