commit | e9f2f45fe9bf79bd4aea47fa1ad9204b68510fd9 | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Wed May 27 03:37:57 2009 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Wed May 27 03:37:57 2009 +0000 |
tree | ae45a10f7b2b32ecf294996ddb90caca9adb170a | |
parent | 68ea78a093271301dc6396fc683644d8e13a90dd [diff] [blame] |
Functions that return references can be rvalues as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 3e28490..618e446 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp
@@ -255,6 +255,9 @@ ComplexPairTy ComplexExprEmitter::VisitCallExpr(const CallExpr *E) { + if (E->getCallReturnType()->isReferenceType()) + return EmitLoadOfLValue(E); + return CGF.EmitCallExpr(E).getComplexVal(); }