File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/rustc_mir/src/transform Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -251,9 +251,12 @@ impl Inliner<'tcx> {
251251 return false ;
252252 }
253253
254- // Avoid inlining functions marked as no_sanitize if sanitizer is enabled,
255- // since instrumentation might be enabled and performed on the caller.
256- if self . tcx . sess . opts . debugging_opts . sanitizer . intersects ( codegen_fn_attrs. no_sanitize ) {
254+ let self_no_sanitize =
255+ self . codegen_fn_attrs . no_sanitize & self . tcx . sess . opts . debugging_opts . sanitizer ;
256+ let callee_no_sanitize =
257+ codegen_fn_attrs. no_sanitize & self . tcx . sess . opts . debugging_opts . sanitizer ;
258+ if self_no_sanitize != callee_no_sanitize {
259+ debug ! ( "`callee has incompatible no_sanitize attribute - not inlining" ) ;
257260 return false ;
258261 }
259262
You can’t perform that action at this time.
0 commit comments