about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-07-07 19:45:43 +0800
committerGitHub <noreply@github.com>2025-07-07 19:45:43 +0800
commit0938cb779f97b329a92256e0cca189c64701098a (patch)
tree192d10c7abd47a764d1b12c1d9a7af6afccae6c4 /compiler/rustc_codegen_llvm/src
parente366f16b1692844cf09598decea02e7d768ef88a (diff)
parentaa364cac52f6f4b79dfd3eeb7189bbd259184d57 (diff)
downloadrust-0938cb779f97b329a92256e0cca189c64701098a.tar.gz
rust-0938cb779f97b329a92256e0cca189c64701098a.zip
Rollup merge of #143564 - Enselic:must_emit_unwind_tables-comment, r=oli-obk
compiler: Deduplicate `must_emit_unwind_tables()` comments

There is one comment at a call site and one comment in the function definition that are mostly saying the same thing. Fold the call site comment into the function definition comment to reduce duplication.

There are actually some inaccuracies in the comments but let's deduplicate before we address the inaccuracies.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index adb53e0b66c..1ea5a062254 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -370,22 +370,6 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
     };
     to_add.extend(inline_attr(cx, inline));
 
-    // The `uwtable` attribute according to LLVM is:
-    //
-    //     This attribute indicates that the ABI being targeted requires that an
-    //     unwind table entry be produced for this function even if we can show
-    //     that no exceptions passes by it. This is normally the case for the
-    //     ELF x86-64 abi, but it can be disabled for some compilation units.
-    //
-    // Typically when we're compiling with `-C panic=abort` (which implies this
-    // `no_landing_pads` check) we don't need `uwtable` because we can't
-    // generate any exceptions! On Windows, however, exceptions include other
-    // events such as illegal instructions, segfaults, etc. This means that on
-    // Windows we end up still needing the `uwtable` attribute even if the `-C
-    // panic=abort` flag is passed.
-    //
-    // You can also find more info on why Windows always requires uwtables here:
-    //      https://bugzilla.mozilla.org/show_bug.cgi?id=1302078
     if cx.sess().must_emit_unwind_tables() {
         to_add.push(uwtable_attr(cx.llcx, cx.sess().opts.unstable_opts.use_sync_unwind));
     }