diff options
| author | bors <bors@rust-lang.org> | 2015-04-22 03:38:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-22 03:38:20 +0000 |
| commit | c0eb9384af9f623563df59a9ae454ffedea1f4f8 (patch) | |
| tree | aaa36f5462dfe299902c6829795a8a8988f3061e /src/rustllvm/PassWrapper.cpp | |
| parent | 2baf3482537f5a245a9c17ca730398f1a8b001d7 (diff) | |
| parent | 58150640254e939519e57bf643af841cc60c1ac3 (diff) | |
| download | rust-c0eb9384af9f623563df59a9ae454ffedea1f4f8.tar.gz rust-c0eb9384af9f623563df59a9ae454ffedea1f4f8.zip | |
Auto merge of #24674 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
| -rw-r--r-- | src/rustllvm/PassWrapper.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index b205d87598c..a2ab8040198 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -92,9 +92,6 @@ LLVMRustCreateTargetMachine(const char *triple, TargetOptions Options; Options.PositionIndependentExecutable = PositionIndependentExecutable; Options.NoFramePointerElim = NoFramePointerElim; -#if LLVM_VERSION_MINOR < 5 - Options.EnableSegmentedStacks = EnableSegmentedStacks; -#endif Options.FloatABIType = FloatABI::Default; Options.UseSoftFloat = UseSoftFloat; if (UseSoftFloat) { @@ -128,10 +125,8 @@ LLVMRustAddAnalysisPasses(LLVMTargetMachineRef TM, PassManagerBase *PM = unwrap(PMR); #if LLVM_VERSION_MINOR >= 6 PM->add(new DataLayoutPass()); -#elif LLVM_VERSION_MINOR == 5 - PM->add(new DataLayoutPass(unwrap(M))); #else - PM->add(new DataLayout(unwrap(M))); + PM->add(new DataLayoutPass(unwrap(M))); #endif unwrap(TM)->addAnalysisPasses(*PM); } @@ -202,10 +197,8 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, raw_fd_ostream OS(path, EC, sys::fs::F_None); if (EC) ErrorInfo = EC.message(); -#elif LLVM_VERSION_MINOR >= 4 - raw_fd_ostream OS(path, ErrorInfo, sys::fs::F_None); #else - raw_fd_ostream OS(path, ErrorInfo, raw_fd_ostream::F_Binary); + raw_fd_ostream OS(path, ErrorInfo, sys::fs::F_None); #endif if (ErrorInfo != "") { LLVMRustSetLastError(ErrorInfo.c_str()); @@ -230,19 +223,13 @@ LLVMRustPrintModule(LLVMPassManagerRef PMR, raw_fd_ostream OS(path, EC, sys::fs::F_None); if (EC) ErrorInfo = EC.message(); -#elif LLVM_VERSION_MINOR >= 4 - raw_fd_ostream OS(path, ErrorInfo, sys::fs::F_None); #else - raw_fd_ostream OS(path, ErrorInfo, raw_fd_ostream::F_Binary); + raw_fd_ostream OS(path, ErrorInfo, sys::fs::F_None); #endif formatted_raw_ostream FOS(OS); -#if LLVM_VERSION_MINOR >= 5 PM->add(createPrintModulePass(FOS)); -#else - PM->add(createPrintModulePass(&FOS)); -#endif PM->run(*unwrap(M)); } |
