diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-12 22:31:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-06-12 22:31:48 +0000 |
commit | cc1b96d356a0bd85c033309b8cfa965f36ae8aa6 (patch) | |
tree | 0494bcbc5d7f1e890c1c814a70b4ee0dd0a8352e /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 6a0c9ae4f93fd29b7bae48513674ab18dda73f9e (diff) | |
download | llvm-cc1b96d356a0bd85c033309b8cfa965f36ae8aa6.zip llvm-cc1b96d356a0bd85c033309b8cfa965f36ae8aa6.tar.gz llvm-cc1b96d356a0bd85c033309b8cfa965f36ae8aa6.tar.bz2 |
PR12086, PR15117
Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).
This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.
llvm-svn: 183872
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 7bbf788..4619322 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1631,10 +1631,6 @@ public: llvm::Value *EmitDynamicCast(llvm::Value *V, const CXXDynamicCastExpr *DCE); llvm::Value* EmitCXXUuidofExpr(const CXXUuidofExpr *E); - void MaybeEmitStdInitializerListCleanup(llvm::Value *loc, const Expr *init); - void EmitStdInitializerListCleanup(llvm::Value *loc, - const InitListExpr *init); - /// \brief Situations in which we might emit a check for the suitability of a /// pointer or glvalue. enum TypeCheckKind { |