From bdabc2f19ffb9e20600dad6e8a300842a7bda50e Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 6 Apr 2018 14:26:03 +0000 Subject: Import LLVM 6.0.1 release including clang, lld and lldb. "where is the kaboom?" deraadt@ --- gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp') diff --git a/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp index e956dbebaff..20251c23b17 100644 --- a/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ b/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -198,8 +198,10 @@ LLVMBool LLVMCreateMCJITCompilerForModule( builder.setEngineKind(EngineKind::JIT) .setErrorStr(&Error) .setOptLevel((CodeGenOpt::Level)options.OptLevel) - .setCodeModel(unwrap(options.CodeModel)) .setTargetOptions(targetOptions); + bool JIT; + if (Optional CM = unwrap(options.CodeModel, JIT)) + builder.setCodeModel(*CM); if (options.MCJMM) builder.setMCJITMemoryManager( std::unique_ptr(unwrap(options.MCJMM))); -- cgit v1.2.3-59-g8ed1b