diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-29 09:39:50 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-29 09:39:50 +0000 |
commit | e7545b33ff79c55d08d78a35b052e494ea49a0bc (patch) | |
tree | cc287689fbc2a32c9bf08d9842350a8b2e0dbc59 /clang/lib/CodeGen | |
parent | d8c12badad7765655e86810eab60db23d1258326 (diff) | |
download | bcm5719-llvm-e7545b33ff79c55d08d78a35b052e494ea49a0bc.tar.gz bcm5719-llvm-e7545b33ff79c55d08d78a35b052e494ea49a0bc.zip |
Implementation of VlA of GNU C++ extension, by Vladimir Yakovlev.
This enables GNU C++ extension "Variable length array" by default.
Differential Revision: http://reviews.llvm.org/D18823
llvm-svn: 268018
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 71b305c773d..768c2030a6c 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1915,7 +1915,7 @@ void CodeGenFunction::EnterDtorCleanups(const CXXDestructorDecl *DD, /// \param zeroInitialize true if each element should be /// zero-initialized before it is constructed void CodeGenFunction::EmitCXXAggrConstructorCall( - const CXXConstructorDecl *ctor, const ConstantArrayType *arrayType, + const CXXConstructorDecl *ctor, const ArrayType *arrayType, Address arrayBegin, const CXXConstructExpr *E, bool zeroInitialize) { QualType elementType; llvm::Value *numElements = diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 64ed42b18d7..a90610f5927 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -472,8 +472,8 @@ CodeGenFunction::EmitCXXConstructExpr(const CXXConstructExpr *E, } } - if (const ConstantArrayType *arrayType - = getContext().getAsConstantArrayType(E->getType())) { + if (const ArrayType *arrayType + = getContext().getAsArrayType(E->getType())) { EmitCXXAggrConstructorCall(CD, arrayType, Dest.getAddress(), E); } else { CXXCtorType Type = Ctor_Complete; diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index c1a892173f7..c795dc9855f 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1879,7 +1879,7 @@ public: const CXXConstructExpr *E); void EmitCXXAggrConstructorCall(const CXXConstructorDecl *D, - const ConstantArrayType *ArrayTy, + const ArrayType *ArrayTy, Address ArrayPtr, const CXXConstructExpr *E, bool ZeroInitialization = false); |