From cdeb800152471d36ea2c424ca78228de619c52ef Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Thu, 3 Dec 2009 16:55:20 +0000 Subject: [PATCH] Eli, I copied my code from this code... Let's fix the souce of the bad idea! Thanks. llvm-svn: 90458 --- clang/lib/CodeGen/CGVtable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 25da95e273c1..8cbd6adb085e 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -318,12 +318,9 @@ public: llvm::Constant *WrapAddrOf(GlobalDecl GD) { const CXXMethodDecl *MD = cast(GD.getDecl()); - if (const CXXDestructorDecl *Dtor = dyn_cast(MD)) - return wrap(CGM.GetAddrOfCXXDestructor(Dtor, GD.getDtorType())); - const llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVtable(MD); - return wrap(CGM.GetAddrOfFunction(MD, Ty)); + return wrap(CGM.GetAddrOfFunction(GD, Ty)); } void OverrideMethods(Path_t *Path, bool MorallyVirtual, int64_t Offset,