Fix a typo/thinko - this was generating the wrong kind of array
authorEnrico Granata <egranata@apple.com>
Tue, 30 Aug 2016 21:33:29 +0000 (21:33 +0000)
committerEnrico Granata <egranata@apple.com>
Tue, 30 Aug 2016 21:33:29 +0000 (21:33 +0000)
llvm-svn: 280164

lldb/source/Symbol/ClangASTContext.cpp

index 9cc8550..21cfeff 100644 (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));