commit | cd2952883e1f80fe6d722ea0f0612221c9b37847 | [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 | c77de1fbfcea4aaf18b28771b5f290e5928b6eb1 [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(); }