diff options
| author | bors <bors@rust-lang.org> | 2018-12-17 04:18:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-17 04:18:14 +0000 |
| commit | 63f8e6e12b3f9655fb58282e7a75f411b7e8b4ee (patch) | |
| tree | 75450095f0d6357635b763ac09087285226ee575 /src/librustc_codegen_llvm | |
| parent | c6fb01d62916afa0c489670b665a39d1fe903a4a (diff) | |
| parent | 6c2d704950a5f05b8ee5468df53d8db9b94e2028 (diff) | |
| download | rust-63f8e6e12b3f9655fb58282e7a75f411b7e8b4ee.tar.gz rust-63f8e6e12b3f9655fb58282e7a75f411b7e8b4ee.zip | |
Auto merge of #56642 - nikic:llvm-6, r=alexcrichton
Bump minimum required LLVM version to 6.0 Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that. I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch. r? @alexcrichton
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/builder.rs | 10 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/context.rs | 5 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/ffi.rs | 4 |
3 files changed, 4 insertions, 15 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs index a95ddefc869..01b1387d9cc 100644 --- a/src/librustc_codegen_llvm/builder.rs +++ b/src/librustc_codegen_llvm/builder.rs @@ -1024,17 +1024,11 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { fn minnum(&mut self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value { self.count_insn("minnum"); - unsafe { - let instr = llvm::LLVMRustBuildMinNum(self.llbuilder, lhs, rhs); - instr.expect("LLVMRustBuildMinNum is not available in LLVM version < 6.0") - } + unsafe { llvm::LLVMRustBuildMinNum(self.llbuilder, lhs, rhs) } } fn maxnum(&mut self, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value { self.count_insn("maxnum"); - unsafe { - let instr = llvm::LLVMRustBuildMaxNum(self.llbuilder, lhs, rhs); - instr.expect("LLVMRustBuildMaxNum is not available in LLVM version < 6.0") - } + unsafe { llvm::LLVMRustBuildMaxNum(self.llbuilder, lhs, rhs) } } fn select( diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index 0bd6146f5aa..b75cd8f68b3 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -10,7 +10,6 @@ use attributes; use llvm; -use llvm_util; use rustc::dep_graph::DepGraphSafe; use rustc::hir; use debuginfo; @@ -446,10 +445,6 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> { attributes::apply_target_cpu_attr(self, llfn) } - fn closure_env_needs_indirect_debuginfo(&self) -> bool { - llvm_util::get_major_version() < 6 - } - fn create_used_variable(&self) { let name = const_cstr!("llvm.used"); let section = const_cstr!("llvm.metadata"); diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 127759a4326..4732db88ec1 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -1222,12 +1222,12 @@ extern "C" { B: &Builder<'a>, LHS: &'a Value, LHS: &'a Value, - ) -> Option<&'a Value>; + ) -> &'a Value; pub fn LLVMRustBuildMaxNum( B: &Builder<'a>, LHS: &'a Value, LHS: &'a Value, - ) -> Option<&'a Value>; + ) -> &'a Value; // Atomic Operations pub fn LLVMRustBuildAtomicLoad(B: &Builder<'a>, |
