From 19b1a6eb2c90fab7cefe74bea5b6de490b65ac9d Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sat, 25 Feb 2012 20:51:20 +0000 Subject: CodeGen support for global variables of type std::initializer_list. This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151457 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index a074466ec5..2803640bda 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -369,7 +369,7 @@ void ConstStructBuilder::ConvertStructToPacked() { bool ConstStructBuilder::Build(InitListExpr *ILE) { if (ILE->initializesStdInitializerList()) { - CGM.ErrorUnsupported(ILE, "global std::initializer_list"); + //CGM.ErrorUnsupported(ILE, "global std::initializer_list"); return false; } -- cgit v1.2.3