diff options
author | Vinson Lee <[email protected]> | 2019-11-20 06:51:22 +0000 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2019-11-21 13:20:08 -0800 |
commit | 6613a4a0295879dc3ba2c13198f3ad5de7919487 (patch) | |
tree | eeb324993e8536fdfbd657ae1b322dcd12a11929 | |
parent | 29d131d619c8b14b6d5b795ab3e17931e8e01502 (diff) |
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 <[email protected]>
Reviewed-by: Jan Zielinski <[email protected]>
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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 |