From 06e863f2902b8ba55b056308875c19f7ba3dab25 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 13 May 2008 23:18:27 +0000 Subject: Add codegen support for block-level compound literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51081 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index a501145a49..4fb69d045e 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -129,6 +129,7 @@ public: Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E); Value *VisitMemberExpr(Expr *E) { return EmitLoadOfLValue(E); } Value *VisitExtVectorElementExpr(Expr *E) { return EmitLoadOfLValue(E); } + Value *VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { return EmitLoadOfLValue(E); } Value *VisitStringLiteral(Expr *E) { return EmitLValue(E).getAddress(); } Value *VisitPreDefinedExpr(Expr *E) { return EmitLValue(E).getAddress(); } @@ -165,10 +166,6 @@ public: return V; } - - Value *VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { - return Visit(E->getInitializer()); - } Value *VisitImplicitCastExpr(const ImplicitCastExpr *E); Value *VisitCastExpr(const CastExpr *E) { -- cgit v1.2.3