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(
8383 llvm::StringRef member_name) {
8484 auto scratch_ctx =
8585 instance_type.GetTypeSystem ().dyn_cast_or_null <SwiftASTContext>();
86- if (scratch_ctx == nullptr || scratch_ctx->HasFatalErrors ())
86+ if (! scratch_ctx || scratch_ctx->HasFatalErrors ())
8787 return {};
8888
8989 auto *remote_ast = &GetRemoteASTContext (*scratch_ctx);
9090 // Check whether we've already cached this offset.
9191 swift::TypeBase *swift_type =
9292 GetCanonicalSwiftType (instance_type).getPointer ();
93- if (swift_type == nullptr )
93+ if (! swift_type)
9494 return {};
9595
9696 // Perform the cache lookup.
@@ -142,6 +142,9 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
142142 }
143143 }
144144
145+ if (!swift_type)
146+ return {};
147+
145148 // Try to determine whether it is safe to use RemoteAST. RemoteAST
146149 // is faster than RemoteMirrors, but can't do dynamic types (checked
147150 // inside RemoteAST) or incomplete types (checked here).
You can’t perform that action at this time.
0 commit comments