diff options
| author | Martin Nordholts <martin.nordholts@codetale.se> | 2025-07-07 09:04:16 +0200 |
|---|---|---|
| committer | Martin Nordholts <martin.nordholts@codetale.se> | 2025-07-07 09:34:34 +0200 |
| commit | aa364cac52f6f4b79dfd3eeb7189bbd259184d57 (patch) | |
| tree | e1f3dc0ac1e108a28036f7a68b974fbad37f7c6d /compiler/rustc_session/src/session.rs | |
| parent | 1eff043e7aab5f5634c1e29f5cf161a6437bcfa3 (diff) | |
| download | rust-aa364cac52f6f4b79dfd3eeb7189bbd259184d57.tar.gz rust-aa364cac52f6f4b79dfd3eeb7189bbd259184d57.zip | |
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_session/src/session.rs')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 8386fe8dab0..85bd8340c3c 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -776,8 +776,15 @@ impl Session { pub fn must_emit_unwind_tables(&self) -> bool { // This is used to control the emission of the `uwtable` attribute on - // LLVM functions. + // LLVM functions. 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` we don't need + // `uwtable` because we can't generate any exceptions! // Unwind tables are needed when compiling with `-C panic=unwind`, but // LLVM won't omit unwind tables unless the function is also marked as // `nounwind`, so users are allowed to disable `uwtable` emission. |
