Skip to content

Commit 7cd8afe

Browse files
committed
[LLDB] Add missing error checking
rdar://157001686
1 parent 96c7323 commit 7cd8afe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6716,12 +6716,15 @@ SwiftASTContext::GetBitSize(opaque_compiler_type_t type,
67166716
exe_scope->CalculateExecutionContext(exe_ctx);
67176717
CompilerType bound_type =
67186718
BindGenericTypeParameters({weak_from_this(), type}, exe_scope);
6719+
if (!bound_type)
6720+
return llvm::createStringError("Cannot bind type: %s",
6721+
type.GetTypeName().AsCString(""));
67196722

67206723
// Check that the type has been bound successfully -- and if not,
67216724
// log the event and bail out to avoid an infinite loop.
67226725
swift::CanType swift_bound_type(GetCanonicalSwiftType(bound_type));
67236726
if (!swift_bound_type || swift_bound_type->hasTypeParameter())
6724-
return llvm::createStringError("Cannot bind type: %s",
6727+
return llvm::createStringError("Cannot canonicalize: %s",
67256728
bound_type.GetTypeName().AsCString(""));
67266729

67276730
// Note that the bound type may be in a different AST context.

0 commit comments

Comments
 (0)