Fix thunk generation for thunks with a parameter with reference type.

llvm-svn: 90412
This commit is contained in:
Eli Friedman
2009-12-03 04:49:52 +00:00
parent 551fe84d0e
commit 4039f35344
2 changed files with 9 additions and 1 deletions

View File

@@ -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));
}