aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-20 00:24:07 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-20 00:24:07 +0000
commit4029ca7ae9d3ffd7738fe2ed8782bebc30f36fd6 (patch)
tree2eadf6254d694ec3ff514796cb5eb9d4920f959e /lib/CodeGen/CGCall.cpp
parent32110dfd1c612e97996fa87c3ca6180461b9fb1f (diff)
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 10fc6d95c2..d444baec8e 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -2001,6 +2001,9 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
}
RValue CodeGenFunction::EmitCallArg(const Expr *E, QualType ArgType) {
+ if (ArgType->isReferenceType())
+ return EmitReferenceBindingToExpr(E, ArgType);
+
return EmitAnyExprToTemp(E);
}