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> {
251
251
return false ;
252
252
}
253
253
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" ) ;
257
260
return false ;
258
261
}
259
262
You can’t perform that action at this time.
0 commit comments