Skip to content

Commit 5a36f3b

Browse files
committed
[IRGen] Improve legibility of conditional (NFC)
1 parent f4a0f4b commit 5a36f3b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8431,11 +8431,10 @@ void IRGenSILFunction::visitClassMethodInst(swift::ClassMethodInst *i) {
84318431
// Because typechecking for the debugger has more lax rules, check the access
84328432
// level of the getter to decide whether to use a dispatch thunk for the
84338433
// debugger.
8434-
bool shouldUseDispatchThunkIfInDebugger =
8435-
!classDecl->getASTContext().LangOpts.DebuggerSupport ||
8436-
methodAccess >= AccessLevel::Public;
8434+
bool inDebugger = classDecl->getASTContext().LangOpts.DebuggerSupport;
8435+
bool shouldUseDispatchThunkIfInDebugger = methodAccess >= AccessLevel::Public;
84378436
if (IGM.hasResilientMetadata(classDecl, ResilienceExpansion::Maximal) &&
8438-
shouldUseDispatchThunkIfInDebugger) {
8437+
(!inDebugger || shouldUseDispatchThunkIfInDebugger)) {
84398438
shouldUseDispatchThunk = true;
84408439
} else if (IGM.getOptions().VirtualFunctionElimination) {
84418440
// For VFE, use a thunk if the target class is in another module. This

0 commit comments

Comments
 (0)