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 @@ -84,14 +84,14 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
84
84
llvm::StringRef member_name) {
85
85
auto scratch_ctx =
86
86
instance_type.GetTypeSystem ().dyn_cast_or_null <SwiftASTContext>();
87
- if (scratch_ctx == nullptr || scratch_ctx->HasFatalErrors ())
87
+ if (! scratch_ctx || scratch_ctx->HasFatalErrors ())
88
88
return {};
89
89
90
90
auto *remote_ast = &GetRemoteASTContext (*scratch_ctx);
91
91
// Check whether we've already cached this offset.
92
92
swift::TypeBase *swift_type =
93
93
scratch_ctx->GetCanonicalSwiftType (instance_type).getPointer ();
94
- if (swift_type == nullptr )
94
+ if (! swift_type)
95
95
return {};
96
96
97
97
// Perform the cache lookup.
@@ -143,6 +143,9 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
143
143
}
144
144
}
145
145
146
+ if (!swift_type)
147
+ return {};
148
+
146
149
// Try to determine whether it is safe to use RemoteAST. RemoteAST
147
150
// is faster than RemoteMirrors, but can't do dynamic types (checked
148
151
// inside RemoteAST) or incomplete types (checked here).
You can’t perform that action at this time.
0 commit comments