File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lldb/source/Plugins/LanguageRuntime/Swift Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,14 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
83
83
llvm::StringRef member_name) {
84
84
auto scratch_ctx =
85
85
instance_type.GetTypeSystem ().dyn_cast_or_null <SwiftASTContext>();
86
- if (scratch_ctx == nullptr || scratch_ctx->HasFatalErrors ())
86
+ if (! scratch_ctx || scratch_ctx->HasFatalErrors ())
87
87
return {};
88
88
89
89
auto *remote_ast = &GetRemoteASTContext (*scratch_ctx);
90
90
// Check whether we've already cached this offset.
91
91
swift::TypeBase *swift_type =
92
92
GetCanonicalSwiftType (instance_type).getPointer ();
93
- if (swift_type == nullptr )
93
+ if (! swift_type)
94
94
return {};
95
95
96
96
// Perform the cache lookup.
@@ -142,6 +142,9 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
142
142
}
143
143
}
144
144
145
+ if (!swift_type)
146
+ return {};
147
+
145
148
// Try to determine whether it is safe to use RemoteAST. RemoteAST
146
149
// is faster than RemoteMirrors, but can't do dynamic types (checked
147
150
// inside RemoteAST) or incomplete types (checked here).
You can’t perform that action at this time.
0 commit comments