about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-10-12 19:46:03 +0200
committerRalf Jung <post@ralfj.de>2019-10-12 19:46:03 +0200
commit9a0b9c69600946c8c665705df2cec9ed7ce63d71 (patch)
tree4ee2732de9101745fe249c0962873bcd7dba0d2e
parent152527f443c51517bb867befa93809ce5b9b1cd1 (diff)
downloadrust-9a0b9c69600946c8c665705df2cec9ed7ce63d71.tar.gz
rust-9a0b9c69600946c8c665705df2cec9ed7ce63d71.zip
remove old branch of unwind logic
-rw-r--r--src/librustc_codegen_llvm/attributes.rs22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs
index 22607476021..210d6cc1696 100644
--- a/src/librustc_codegen_llvm/attributes.rs
+++ b/src/librustc_codegen_llvm/attributes.rs
@@ -275,18 +275,7 @@ pub fn from_fn_attrs(
     } else if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_ALLOCATOR_NOUNWIND) {
         // Special attribute for allocator functions, which can't unwind
         false
-    } else if let Some(_) = id {
-        // rust-lang/rust#64655, rust-lang/rust#63909: to minimize
-        // risk associated with changing cases where nounwind
-        // attribute is attached, this code is deliberately mimicking
-        // old control flow based on whether `id` is `Some` or `None`.
-        //
-        // However, in the long term we should either:
-        // - fold this into final else (i.e. stop inspecting `id`)
-        // - or, adopt Rust PR #63909.
-        //
-        // see also Rust RFC 2753.
-
+    } else {
         let sig = cx.tcx.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), &sig);
         if sig.abi == Abi::Rust || sig.abi == Abi::RustCall {
             // Any Rust method (or `extern "Rust" fn` or `extern
@@ -312,15 +301,6 @@ pub fn from_fn_attrs(
             // In either case, we mark item as explicitly nounwind.
             false
         }
-    } else {
-        // assume this can possibly unwind, avoiding the application of a
-        // `nounwind` attribute below.
-        //
-        // (But: See comments in previous branch. Specifically, it is
-        // unclear whether there is real value in the assumption this
-        // can unwind. The conservatism here may just be papering over
-        // a real problem by making some UB a bit harder to hit.)
-        true
     });
 
     // Always annotate functions with the target-cpu they are compiled for.