From: Vinson Lee Date: Wed, 20 Nov 2019 06:51:22 +0000 (+0000) Subject: swr: Fix build with llvm-10.0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6613a4a0295879dc3ba2c13198f3ad5de7919487;p=mesa.git swr: Fix build with llvm-10.0. Fix build error after llvm-10.0 commit 1dfede3122ee ("Move CodeGenFileType enum to Support/CodeGen.h"). ../src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp: In member function ‘void JitManager::DumpAsm(llvm::Function*, const char*)’: ../src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp:428:45: error: ‘CGFT_AssemblyFile’ is not a member of ‘llvm::TargetMachine’ *pMPasses, filestream, nullptr, TargetMachine::CGFT_AssemblyFile); ^ Signed-off-by: Vinson Lee Reviewed-by: Jan Zielinski --- diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 74edd4febbc..87aecb3a4de 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -423,7 +423,10 @@ void JitManager::DumpAsm(Function* pFunction, const char* fileName) legacy::PassManager* pMPasses = new legacy::PassManager(); auto* pTarget = mpExec->getTargetMachine(); pTarget->Options.MCOptions.AsmVerbose = true; -#if LLVM_VERSION_MAJOR >= 7 +#if LLVM_VERSION_MAJOR >= 10 + pTarget->addPassesToEmitFile( + *pMPasses, filestream, nullptr, CGFT_AssemblyFile); +#elif LLVM_VERSION_MAJOR >= 7 pTarget->addPassesToEmitFile( *pMPasses, filestream, nullptr, TargetMachine::CGFT_AssemblyFile); #else