Skip to content

Commit 2e9ab7c

Browse files
authored
[NFC][Driver][CFI] Update boolean expression (#135881)
Show why we don't need regular CFI runtime, when CFI diag runtime is linked.
1 parent ab7e0c0 commit 2e9ab7c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Driver/SanitizerArgs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@ bool SanitizerArgs::needsUbsanCXXRt() const {
371371
}
372372

373373
bool SanitizerArgs::needsCfiRt() const {
374-
return !(Sanitizers.Mask & SanitizerKind::CFI & ~TrapSanitizers.Mask) &&
375-
CfiCrossDso && !ImplicitCfiRuntime;
374+
return !needsCfiDiagRt() && CfiCrossDso && !ImplicitCfiRuntime;
376375
}
377376

378377
bool SanitizerArgs::needsCfiDiagRt() const {

0 commit comments

Comments
 (0)