From: Samuel Pitoiset Date: Thu, 14 Nov 2019 09:04:29 +0000 (+0100) Subject: ac: fix build with recent LLVM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee9811a0bb86d3d75fafeece368f6182048807d0;p=mesa.git ac: fix build with recent LLVM Build is broken since "Move CodeGenFileType enum to Support/CodeGen.h". Signed-off-by: Samuel Pitoiset Reviewed-by: Pierre-Eric Pelloux-Prayer --- 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;