diff options
author | Reid Kleckner <rnk@google.com> | 2016-05-03 18:44:29 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-05-03 18:44:29 +0000 |
commit | 73c89ce83ee16759f4b252d030b466e697f9fac6 (patch) | |
tree | 9ff9097ad4731d1bc9d66e378ebfd15db3fa200f /lib/CodeGen/CGExprCXX.cpp | |
parent | 0cf3b61c8d3d6240d2ade756fdbbd452a5e68fc1 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index a90610f592..c6f46c3969 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/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(), |