aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
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
commit6804fa27eb17567f8a783f92ab8c768ca0b561ba (patch)
treeb0b30aa8e6397002144e79afffcd001695c092b9 /lib/CodeGen/CGCXX.cpp
parent35c98cc4c00efcfe47ad0b716e7c50afb9c5ff75 (diff)
Fix thunk generation for thunks with a parameter with reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 77d3a3eb42..636cc57b2a 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/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));
}