From 4b60f30a126afaf92bd9ed34336c9b9547408c99 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 3 May 2016 18:44:29 +0000 Subject: [MS] Pass CalleeDecl to adjustThisArgumentForVirtualFunctionCall If we are devirtualizing, then we want to compute the 'this' adjustment of the devirtualized target, not the adjustment of the base's method definition, which is usually zero. Fixes PR27621 llvm-svn: 268418 --- clang/lib/CodeGen/CGExprCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprCXX.cpp') diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index a90610f5927..c6f46c3969b 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -274,7 +274,7 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr( if (MD->isVirtual()) { This = CGM.getCXXABI().adjustThisArgumentForVirtualFunctionCall( - *this, MD, This, UseVirtualCall); + *this, CalleeDecl, This, UseVirtualCall); } return EmitCXXMemberOrOperatorCall(MD, Callee, ReturnValue, This.getPointer(), -- cgit v1.2.3