summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-08-24 11:54:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-08-24 11:54:20 +0000
commitc215e76f784f7a7625b22a62ed585ced81b527a2 (patch)
tree0a75830ecdd0e9be5ba157b675308b92085c1a8e /clang/lib/CodeGen/CodeGenModule.cpp
parentd574ac2f4de2fcf868256672d598800a80aa3530 (diff)
downloadbcm5719-llvm-c215e76f784f7a7625b22a62ed585ced81b527a2.tar.gz
bcm5719-llvm-c215e76f784f7a7625b22a62ed585ced81b527a2.zip
Push ArrayRef through the Expr hierarchy.
No functionality change. llvm-svn: 162552
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 72e3e5c29aa..554aa1cb4cd 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1469,10 +1469,10 @@ CodeGenModule::MaybeEmitGlobalStdInitializerListInitializer(const VarDecl *D,
// Now clone the InitListExpr to initialize the array instead.
// Incredible hack: we want to use the existing InitListExpr here, so we need
// to tell it that it no longer initializes a std::initializer_list.
- Expr *arrayInit = new (ctx) InitListExpr(ctx, init->getLBraceLoc(),
- const_cast<InitListExpr*>(init)->getInits(),
- init->getNumInits(),
- init->getRBraceLoc());
+ ArrayRef<Expr*> Inits(const_cast<InitListExpr*>(init)->getInits(),
+ init->getNumInits());
+ Expr *arrayInit = new (ctx) InitListExpr(ctx, init->getLBraceLoc(), Inits,
+ init->getRBraceLoc());
arrayInit->setType(arrayType);
if (!cleanups.empty())
OpenPOWER on IntegriCloud