summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-05 22:17:57 +0000
committerbors <bors@rust-lang.org>2018-10-05 22:17:57 +0000
commit17a9dc7513b9fea883dc9505f09f97c63d1d601b (patch)
tree34be1935d6ac0448637d6c95f751dbe7a33a83e7 /src/librustc_codegen_llvm
parentb801ae66425cf7c3c71052b19ef8f145b0d0513d (diff)
parenta154257c85fc109c19610b2c5fe25499e77ea9a7 (diff)
downloadrust-1.29.2.tar.gz
rust-1.29.2.zip
Auto merge of #54808 - pietroalbini:stable-1.29.2, r=alexcrichton 1.29.2
1.29.2 stable point release

This point release includes a backport of #54639 (a miscompilation) and the fix for #54206 (rls missing on windows-gnu). It also backports a release notes fix (#54150).

The target date for the release is Thursday 11th.

r? @Mark-Simulacrum
cc @rust-lang/core @rust-lang/release
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/type_of.rs19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs
index 4728d7717a1..751c4ea5ce6 100644
--- a/src/librustc_codegen_llvm/type_of.rs
+++ b/src/librustc_codegen_llvm/type_of.rs
@@ -10,11 +10,9 @@
 
 use abi::{FnType, FnTypeExt};
 use common::*;
-use llvm;
 use rustc::hir;
 use rustc::ty::{self, Ty, TypeFoldable};
 use rustc::ty::layout::{self, Align, LayoutOf, Size, TyLayout};
-use rustc_target::spec::PanicStrategy;
 use rustc_target::abi::FloatTy;
 use rustc_mir::monomorphize::item::DefPathBasedNames;
 use type_::Type;
@@ -429,12 +427,19 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> {
                         PointerKind::Shared
                     },
                     hir::MutMutable => {
-                        // Only emit noalias annotations for LLVM >= 6 or in panic=abort
-                        // mode, as prior versions had many bugs in conjunction with
-                        // unwinding. See also issue #31681.
+                        // Previously we would only emit noalias annotations for LLVM >= 6 or in
+                        // panic=abort mode. That was deemed right, as prior versions had many bugs
+                        // in conjunction with unwinding, but later versions didn’t seem to have
+                        // said issues. See issue #31681.
+                        //
+                        // Alas, later on we encountered a case where noalias would generate wrong
+                        // code altogether even with recent versions of LLVM in *safe* code with no
+                        // unwinding involved. See #54462.
+                        //
+                        // For now, do not enable mutable_noalias by default at all, while the
+                        // issue is being figured out.
                         let mutable_noalias = cx.tcx.sess.opts.debugging_opts.mutable_noalias
-                            .unwrap_or(unsafe { llvm::LLVMRustVersionMajor() >= 6 }
-                                || cx.tcx.sess.panic_strategy() == PanicStrategy::Abort);
+                            .unwrap_or(false);
                         if mutable_noalias {
                             PointerKind::UniqueBorrowed
                         } else {