From 558d2abc7f9fd6801cc7677200992313ae90b5d8 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 15 Sep 2010 10:14:12 +0000 Subject: one piece of code is responsible for the lifetime of every aggregate slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 45c5fb9f0b..d4b1bd940c 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1063,7 +1063,7 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) { CGF.EmitLoadOfKVCRefLValue(LV, E->getType()); } else - CGF.EmitAnyExpr(E, 0, false, true); + CGF.EmitAnyExpr(E, AggValueSlot::ignored(), true); return 0; } case CK_VectorSplat: { @@ -1127,7 +1127,7 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) { // Okay, this is a cast from an aggregate. It must be a cast to void. Just // evaluate the result and return. - CGF.EmitAggExpr(E, 0, false, true); + CGF.EmitAggExpr(E, AggValueSlot::ignored(), true); return 0; } -- cgit v1.2.3