diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-05-27 03:37:57 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-05-27 03:37:57 +0000 |
| commit | d8b7ae205e61cc54fb954e67209aa8867e9a8b45 (patch) | |
| tree | 99d6676b7b465946fdb0fc5880f088ccc55fff1f /clang/lib/CodeGen/CGExprComplex.cpp | |
| parent | d6f28344966f57f66859ea327d13b5094c2a3077 (diff) | |
| download | llvm-d8b7ae205e61cc54fb954e67209aa8867e9a8b45.zip llvm-d8b7ae205e61cc54fb954e67209aa8867e9a8b45.tar.gz llvm-d8b7ae205e61cc54fb954e67209aa8867e9a8b45.tar.bz2 | |
Functions that return references can be rvalues as well.
llvm-svn: 72457
Diffstat (limited to 'clang/lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index 3e28490f..618e446 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -255,6 +255,9 @@ VisitImaginaryLiteral(const ImaginaryLiteral *IL) { ComplexPairTy ComplexExprEmitter::VisitCallExpr(const CallExpr *E) { + if (E->getCallReturnType()->isReferenceType()) + return EmitLoadOfLValue(E); + return CGF.EmitCallExpr(E).getComplexVal(); } |
