summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-06-26 19:18:25 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-06-26 19:18:25 +0000
commit727a771a5f8492665817729a84a8bc83d21f37c5 (patch)
treea4a26a18838918591d79e3fe0f52f650fefe7102 /clang/lib/CodeGen
parent47e4518117bb2aaf5a442037c8a4f9de962dbfa6 (diff)
downloadbcm5719-llvm-727a771a5f8492665817729a84a8bc83d21f37c5.tar.gz
bcm5719-llvm-727a771a5f8492665817729a84a8bc83d21f37c5.zip
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. llvm-svn: 159219
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprCXX.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index f35287d5406..372eb5407c9 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud