diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-08 20:56:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-08 20:56:19 +0000 |
commit | 7a2b425ee140272967cce709fa48cb6467edd404 (patch) | |
tree | dc4429b6f94bb3b945cdff6236969bebcdc74ef2 /clang | |
parent | 559c9fb134623e73e8c46d15b15a72fb3d350ec1 (diff) | |
download | bcm5719-llvm-7a2b425ee140272967cce709fa48cb6467edd404.tar.gz bcm5719-llvm-7a2b425ee140272967cce709fa48cb6467edd404.zip |
Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.
llvm-svn: 116101
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index bd773f2dad6..31ba3373f08 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -562,16 +562,6 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) { unsigned NumInitElements = E->getNumInits(); RecordDecl *SD = E->getType()->getAs<RecordType>()->getDecl(); - // If we're initializing the whole aggregate, just do it in place. - // FIXME: This is a hack around an AST bug (PR6537). - if (NumInitElements == 1 && E->getType() == E->getInit(0)->getType()) { - EmitInitializationToLValue(E->getInit(0), - CGF.MakeAddrLValue(DestPtr, E->getType()), - E->getType()); - return; - } - - if (E->getType()->isUnionType()) { // Only initialize one field of a union. The field itself is // specified by the initializer list. |