summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-03 04:49:52 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-03 04:49:52 +0000
commit4039f35344be462f88d97fac332fc54c95146a8c (patch)
tree3eff1a62ca7f3c32cae566a07faac3db42bc984d /clang/lib
parent551fe84d0ef50f7ef16f8b68276caecd881cb900 (diff)
downloadbcm5719-llvm-4039f35344be462f88d97fac332fc54c95146a8c.tar.gz
bcm5719-llvm-4039f35344be462f88d97fac332fc54c95146a8c.zip
Fix thunk generation for thunks with a parameter with reference type.
llvm-svn: 90412
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 77d3a3eb425..636cc57b2a5 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -940,7 +940,8 @@ CodeGenFunction::GenerateCovariantThunk(llvm::Function *Fn,
QualType ArgType = D->getType();
// llvm::Value *Arg = CGF.GetAddrOfLocalVar(Dst);
- Expr *Arg = new (getContext()) DeclRefExpr(D, ArgType, SourceLocation());
+ Expr *Arg = new (getContext()) DeclRefExpr(D, ArgType.getNonReferenceType(),
+ SourceLocation());
CallArgs.push_back(std::make_pair(EmitCallArg(Arg, ArgType), ArgType));
}
OpenPOWER on IntegriCloud