Commit e031f365 by Ben Clayton

LLVMReactor: Build fixes for REACTOR_EMIT_DEBUG_INFO

Always use toLLVM() to avoid a compiler warning / error that the function was declared by never used. Fix the arguments passed to the DebugInfo constructor. Change-Id: I1df069c028c9bfcf1f8e7f4221ffffd4f0261069 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/34329 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 8d269bac
......@@ -197,7 +197,7 @@ namespace
return targetMachines.getOrCreate(static_cast<int>(optlevel), [&]() {
return TargetMachineSPtr(llvm::EngineBuilder()
#ifdef ENABLE_RR_DEBUG_INFO
.setOptLevel(llvm::CodeGenOpt::None)
.setOptLevel(toLLVM(rr::Optimization::Level::None))
#else
.setOptLevel(toLLVM(optlevel))
#endif // ENABLE_RR_DEBUG_INFO
......@@ -1329,7 +1329,7 @@ namespace rr
jit->function = rr::createFunction("", T(ReturnType), T(Params));
#ifdef ENABLE_RR_DEBUG_INFO
jit->debugInfo = std::unique_ptr<DebugInfo>(new DebugInfo(jit->builder, jit->context, jit->module.get(), jit->function));
jit->debugInfo = std::unique_ptr<DebugInfo>(new DebugInfo(jit->builder.get(), &jit->context, jit->module.get(), jit->function));
#endif // ENABLE_RR_DEBUG_INFO
jit->builder->SetInsertPoint(llvm::BasicBlock::Create(jit->context, "", jit->function));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment