]> granicus.if.org Git - clang/commitdiff
Eli, I copied my code from this code... Let's fix the souce of the bad idea!
authorMike Stump <mrs@apple.com>
Thu, 3 Dec 2009 16:55:20 +0000 (16:55 +0000)
committerMike Stump <mrs@apple.com>
Thu, 3 Dec 2009 16:55:20 +0000 (16:55 +0000)
Thanks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90458 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index 25da95e273c199a67a5fe855f276cca04f2c695a..8cbd6adb085e551a25733a913b2cfaa5c81950b9 100644 (file)
@@ -318,12 +318,9 @@ public:
   llvm::Constant *WrapAddrOf(GlobalDecl GD) {
     const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
 
-    if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(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,