forked from OSchip/llvm-project
Fix thunk generation for thunks with a parameter with reference type.
llvm-svn: 90412
This commit is contained in:
parent
551fe84d0e
commit
4039f35344
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: clang-cc -emit-llvm-only %s
|
||||
|
||||
struct A { int a; virtual void aa(int&); };
|
||||
struct B { int b; virtual void bb(int&); };
|
||||
struct C : A,B { virtual void aa(int&), bb(int&); };
|
||||
void C::aa(int&) {}
|
||||
void C::bb(int&) {}
|
Loading…
Reference in New Issue