diff options
author | Vinson Lee <[email protected]> | 2018-06-25 09:52:19 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2018-06-28 08:18:06 -0500 |
commit | f90a60fe7951c7cd063581770e7a3860c253ced3 (patch) | |
tree | a7eca7f82e652eb96a3ce07146872a505a148dd7 /src/gallium/drivers/swr | |
parent | c7e9102d891e1014dc3d3fc62490a9cb79bcef4e (diff) |
swr/rast: Fix addPassesToEmitFile usage with llvm-7.0.
Fix build error after llvm-7.0svn r332881 ("CodeGen: Add a dwo output
file argument to addPassesToEmitFile and hook it up to dwo output.").
CXX rasterizer/jitter/libmesaswr_la-JitManager.lo
rasterizer/jitter/JitManager.cpp:368:93: error: too few arguments to function call, expected at least 4, have 3
pTarget->addPassesToEmitFile(*pMPasses, filestream, TargetMachine::CGFT_AssemblyFile);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp index 5cf527ecd89..5bacf551261 100644 --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp @@ -414,7 +414,11 @@ 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 + pTarget->addPassesToEmitFile(*pMPasses, filestream, nullptr, TargetMachine::CGFT_AssemblyFile); +#else pTarget->addPassesToEmitFile(*pMPasses, filestream, TargetMachine::CGFT_AssemblyFile); +#endif pMPasses->run(*pModule); delete pMPasses; pTarget->Options.MCOptions.AsmVerbose = false; |