aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2012-02-19 14:53:49 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2012-02-19 14:53:49 +0000
commit24fe798fffc1748d8bce1321af42981c3719cb85 (patch)
tree98f0fda9ebaad7a52441db2c5583564adbd9c3df /lib/CodeGen/CGExprConstant.cpp
parentaf130fd78267ee9e2395b758a7d827b07ce317a0 (diff)
Refuse to compile global std::initializer_lists instead of doing completely the wrong thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 985e53227e..a7cd36862b 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -339,6 +339,11 @@ void ConstStructBuilder::ConvertStructToPacked() {
}
bool ConstStructBuilder::Build(InitListExpr *ILE) {
+ if (ILE->initializesStdInitializerList()) {
+ CGM.ErrorUnsupported(ILE, "global std::initializer_list");
+ return false;
+ }
+
RecordDecl *RD = ILE->getType()->getAs<RecordType>()->getDecl();
const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD);