Skip to content

Commit 4f45622

Browse files
author
Davide Italiano
committed
[RemoteAST] Stop bypassing resilience when doing queries.
Avoid going to IRGen with a resilient type to avoid crashing. This is tested in lldb. <rdar://problem/45049259>
1 parent 6952909 commit 4f45622

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/RemoteAST/RemoteAST.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ struct IRGenContext {
7575

7676
static IRGenOptions createIRGenOptions() {
7777
IRGenOptions IROpts;
78-
IROpts.EnableResilienceBypass = true;
7978
return IROpts;
8079
}
8180

@@ -185,7 +184,7 @@ class RemoteASTContextImpl {
185184
VarDecl *member = findField(typeDecl, memberName);
186185

187186
// If we found a member, try to find its offset statically.
188-
if (member) {
187+
if (member && member->hasStorage() && !typeDecl->isResilient()) {
189188
if (auto irgen = getIRGen()) {
190189
return getOffsetOfFieldFromIRGen(irgen->IGM, type, typeDecl,
191190
optMetadata, member);

0 commit comments

Comments
 (0)