mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 03:50:33 +08:00
bug fix in ClangASTType when trying to get size of a non-complete type
llvm-svn: 135989
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user