aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-27 16:45:02 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-27 16:45:02 +0000
commite70e8f7fef3efb3d526ee25b3a0e2a4bf67a04b6 (patch)
treebbf0cbcc6ad5cb51abb19a3f5680780ed9797408 /lib/CodeGen/CGExprAgg.cpp
parentbffed8a98cf5775cd39dc1765abc75c914513012 (diff)
IRgen support for calls to functions that return references to aggregate exressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 00c1f8dbc1..59c00528a8 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -186,6 +186,11 @@ void AggExprEmitter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
}
void AggExprEmitter::VisitCallExpr(const CallExpr *E) {
+ if (E->getCallReturnType()->isReferenceType()) {
+ EmitAggLoadOfLValue(E);
+ return;
+ }
+
RValue RV = CGF.EmitCallExpr(E);
EmitFinalDestCopy(E, RV);
}