forked from OSchip/llvm-project
bug fix in ClangASTType when trying to get size of a non-complete type
llvm-svn: 135989
This commit is contained in:
parent
990f771a9a
commit
77d24d374a
|
@ -1373,9 +1373,13 @@ ClangASTType::GetTypeByteSize(
|
|||
clang::ASTContext *ast_context,
|
||||
lldb::clang_type_t opaque_clang_qual_type)
|
||||
{
|
||||
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(opaque_clang_qual_type));
|
||||
|
||||
return (ast_context->getTypeSize (qual_type) + 7) / 8;
|
||||
if (ClangASTContext::GetCompleteType (ast_context, opaque_clang_qual_type))
|
||||
{
|
||||
clang::QualType qual_type(clang::QualType::getFromOpaquePtr(opaque_clang_qual_type));
|
||||
return (ast_context->getTypeSize (qual_type) + 7) / 8;
|
||||
}
|
||||
return UINT32_MAX;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue