diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-27 18:18:05 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-27 18:18:05 +0000 |
| commit | b7f5a9c5cd441eed417d3f1924ddcf538589e65e (patch) | |
| tree | 71b8e3170313db274d513b1f460bf7784fd2bc2c /clang/lib/CodeGen | |
| parent | a245edc82ff2f3ae9cd28a77502aa293f1c65ebf (diff) | |
| download | bcm5719-llvm-b7f5a9c5cd441eed417d3f1924ddcf538589e65e.tar.gz bcm5719-llvm-b7f5a9c5cd441eed417d3f1924ddcf538589e65e.zip | |
Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.
llvm-svn: 159280
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 372eb5407c9..30324b97ef1 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -102,8 +102,7 @@ static bool canDevirtualizeMemberFunctionCalls(ASTContext &Context, // b->f(); // } // - const CXXRecordDecl *MostDerivedClassDecl = - Base->getMostDerivedClassDeclForType(); + const CXXRecordDecl *MostDerivedClassDecl = Base->getBestDynamicClassType(); if (MostDerivedClassDecl->hasAttr<FinalAttr>()) return true; @@ -228,8 +227,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, bool UseVirtualCall = MD->isVirtual() && !ME->hasQualifier() && !canDevirtualizeMemberFunctionCalls(getContext(), Base, MD); - const CXXRecordDecl *MostDerivedClassDecl = - Base->getMostDerivedClassDeclForType(); + const CXXRecordDecl *MostDerivedClassDecl = Base->getBestDynamicClassType(); llvm::Value *Callee; if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(MD)) { |

