diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-05-27 16:45:02 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-05-27 16:45:02 +0000 |
| commit | ddcbfe7b5333f9ef3a17fb147d61df10a5f10d45 (patch) | |
| tree | 3653434db3aa2bdfb310e8c79e5e7f3bad4caddc /clang/lib | |
| parent | 5063613a3b62f30e6d11bfd90e24e43894b0f31b (diff) | |
| download | bcm5719-llvm-ddcbfe7b5333f9ef3a17fb147d61df10a5f10d45.tar.gz bcm5719-llvm-ddcbfe7b5333f9ef3a17fb147d61df10a5f10d45.zip | |
IRgen support for calls to functions that return references to aggregate exressions.
llvm-svn: 72479
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 00c1f8dbc1c..59c00528a83 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/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); } |

