Added vector to ASTContext to store references to "complete" VLA types
(VLAs with a specified size expresssion). This vector owns the
references to these type objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43502 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index ba8ee07..ee45c00 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -455,10 +455,10 @@
// Since we don't unique expressions, it isn't possible to unique VLA's
// that have an expression provided for their size.
- ArrayType *New = new VariableArrayType(EltTy, QualType(), NumElts,
- ASM, EltTypeQuals);
+ VariableArrayType *New = new VariableArrayType(EltTy, QualType(), NumElts,
+ ASM, EltTypeQuals);
- // FIXME: Also add non-uniqued VLAs into a list of their own.
+ CompleteVariableArrayTypes.push_back(New);
Types.push_back(New);
return QualType(New, 0);
}