Module: Mesa
Branch: master
Commit: ee9811a0bb86d3d75fafeece368f6182048807d0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee9811a0bb86d3d75fafeece368f6182048807d0

Author: Samuel Pitoiset <[email protected]>
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 <[email protected]>
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>

---

 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;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to