@@ -1110,12 +1110,11 @@ where
1110
1110
///
1111
1111
/// This takes two primary parameters:
1112
1112
///
1113
- /// * `codegen_fn_attr_flags` - these are flags calculated as part of the
1114
- /// codegen attrs for a defined function. For function pointers this set of
1115
- /// flags is the empty set. This is only applicable for Rust-defined
1116
- /// functions, and generally isn't needed except for small optimizations where
1117
- /// we try to say a function which otherwise might look like it could unwind
1118
- /// doesn't actually unwind (such as for intrinsics and such).
1113
+ /// * `fn_def_id` - the `DefId` of the function. If this is provided then we can
1114
+ /// determine more precisely if the function can unwind. If this is not provided
1115
+ /// then we will only infer whether the function can unwind or not based on the
1116
+ /// ABI of the function. For example, a function marked with `#[rustc_nounwind]`
1117
+ /// is known to not unwind even if it's using Rust ABI.
1119
1118
///
1120
1119
/// * `abi` - this is the ABI that the function is defined with. This is the
1121
1120
/// primary factor for determining whether a function can unwind or not.
@@ -1147,11 +1146,6 @@ where
1147
1146
/// aborts the process.
1148
1147
/// * This affects whether functions have the LLVM `nounwind` attribute, which
1149
1148
/// affects various optimizations and codegen.
1150
- ///
1151
- /// FIXME: this is actually buggy with respect to Rust functions. Rust functions
1152
- /// compiled with `-Cpanic=unwind` and referenced from another crate compiled
1153
- /// with `-Cpanic=abort` will look like they can't unwind when in fact they
1154
- /// might (from a foreign exception or similar).
1155
1149
#[ inline]
1156
1150
#[ tracing:: instrument( level = "debug" , skip( tcx) ) ]
1157
1151
pub fn fn_can_unwind ( tcx : TyCtxt < ' _ > , fn_def_id : Option < DefId > , abi : SpecAbi ) -> bool {
0 commit comments