diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-26 19:18:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-26 19:18:25 +0000 |
commit | 12582bdc2e1fca260eb2437d87dab5302c37bab2 (patch) | |
tree | 6b6188443e051635cca486894ac6b9e6ca9032fc /lib/CodeGen/CGExprCXX.cpp | |
parent | 37d2a00f4ca5689dac7fec2931fcef37556f5092 (diff) |
Fix a bug in my previous patch: If we are not doing a virtual call because
the member expression is qualified, call the method specified in the code,
not the most derived one we can find.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index f35287d540..372eb5407c 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -240,6 +240,8 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, MD->isVirtual() && ME->hasQualifier()) Callee = BuildAppleKextVirtualCall(MD, ME->getQualifier(), Ty); + else if (ME->hasQualifier()) + Callee = CGM.GetAddrOfFunction(GlobalDecl(Dtor, Dtor_Complete), Ty); else { const CXXMethodDecl *DM = Dtor->getCorrespondingMethodInClass(MostDerivedClassDecl); @@ -258,6 +260,8 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, MD->isVirtual() && ME->hasQualifier()) Callee = BuildAppleKextVirtualCall(MD, ME->getQualifier(), Ty); + else if (ME->hasQualifier()) + Callee = CGM.GetAddrOfFunction(MD, Ty); else { const CXXMethodDecl *DerivedMethod = MD->getCorrespondingMethodInClass(MostDerivedClassDecl); |