Fix a typo/thinko - this was generating the wrong kind of array

llvm-svn: 280164
This commit is contained in:
Enrico Granata 2016-08-30 21:33:29 +00:00
parent a9c929e18f
commit befba52f89

View File

@ -4573,7 +4573,7 @@ ClangASTContext::GetArrayType (lldb::opaque_compiler_type_t type, uint64_t size)
clang::QualType qual_type(GetCanonicalQualType(type));
if (clang::ASTContext *ast_ctx = getASTContext())
{
if (size == 0)
if (size != 0)
return CompilerType (ast_ctx, ast_ctx->getConstantArrayType(qual_type, llvm::APInt(64, size), clang::ArrayType::ArraySizeModifier::Normal, 0));
else
return CompilerType (ast_ctx, ast_ctx->getIncompleteArrayType(qual_type, clang::ArrayType::ArraySizeModifier::Normal, 0));