Mesa (master): ac: fix build with recent LLVM
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 14 14:42:42 UTC 2019
Module: Mesa
Branch: master
Commit: ee9811a0bb86d3d75fafeece368f6182048807d0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee9811a0bb86d3d75fafeece368f6182048807d0
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Nov 14 10:04:29 2019 +0100
ac: fix build with recent LLVM
Build is broken since "Move CodeGenFileType enum to Support/CodeGen.h".
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
---
src/amd/llvm/ac_llvm_helper.cpp | 4 ++++
1 file changed, 4 insertions(+)
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;
More information about the mesa-commit
mailing list