Skip to content

Commit 7a2b425

Browse files
committed
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
1 parent 559c9fb commit 7a2b425

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

clang/lib/CodeGen/CGExprAgg.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -562,16 +562,6 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) {
562562
unsigned NumInitElements = E->getNumInits();
563563
RecordDecl *SD = E->getType()->getAs<RecordType>()->getDecl();
564564

565-
// If we're initializing the whole aggregate, just do it in place.
566-
// FIXME: This is a hack around an AST bug (PR6537).
567-
if (NumInitElements == 1 && E->getType() == E->getInit(0)->getType()) {
568-
EmitInitializationToLValue(E->getInit(0),
569-
CGF.MakeAddrLValue(DestPtr, E->getType()),
570-
E->getType());
571-
return;
572-
}
573-
574-
575565
if (E->getType()->isUnionType()) {
576566
// Only initialize one field of a union. The field itself is
577567
// specified by the initializer list.

0 commit comments

Comments
 (0)