From f9d4149c29e8b989fa3624993be379f380e48dcf Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 14 May 2015 12:10:43 -0700 Subject: rustc: Update LLVM This commit updates the LLVM submodule in use to the current HEAD of the LLVM repository. This is primarily being done to start picking up unwinding support for MSVC, which is currently unimplemented in the revision of LLVM we are using. Along the way a few changes had to be made: * As usual, lots of C++ debuginfo bindings in LLVM changed, so there were some significant changes to our RustWrapper.cpp * As usual, some pass management changed in LLVM, so clang was re-scrutinized to ensure that we're doing the same thing as clang. * Some optimization options are now passed directly into the `PassManagerBuilder` instead of through CLI switches to LLVM. * The `NoFramePointerElim` option was removed from LLVM, favoring instead the `no-frame-pointer-elim` function attribute instead. Additionally, LLVM has picked up some new optimizations which required fixing an existing soundness hole in the IR we generate. It appears that the current LLVM we use does not expose this hole. When an enum is moved, the previous slot in memory is overwritten with a bit pattern corresponding to "dropped". When the drop glue for this slot is run, however, the switch on the discriminant can often start executing the `unreachable` block of the switch due to the discriminant now being outside the normal range. This was patched over locally for now by having the `unreachable` block just change to a `ret void`. --- src/rustllvm/ExecutionEngineWrapper.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp') diff --git a/src/rustllvm/ExecutionEngineWrapper.cpp b/src/rustllvm/ExecutionEngineWrapper.cpp index e37ede82bb5..105472cf4f4 100644 --- a/src/rustllvm/ExecutionEngineWrapper.cpp +++ b/src/rustllvm/ExecutionEngineWrapper.cpp @@ -103,9 +103,6 @@ extern "C" LLVMExecutionEngineRef LLVMBuildExecutionEngine(LLVMModuleRef mod) std::string error_str; TargetOptions options; - options.JITEmitDebugInfo = true; - options.NoFramePointerElim = true; - RustJITMemoryManager *mm = new RustJITMemoryManager; ExecutionEngine *ee = -- cgit 1.4.1-3-g733a5