From edee783ed3edcd7fd988b9fb1dc58361a7e8f8a0 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 6 Oct 2009 23:02:00 +0000 Subject: [PATCH] Uncomment some commented out code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83428 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCXX.cpp | 8 ++++---- test/CodeGenCXX/virtual-base-cast.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 20b2bdcd5e..bbaa226c21 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -894,9 +894,9 @@ public: const CXXMethodDecl *MD = *mi; llvm::Constant *m = 0; -// if (const CXXDestructorDecl *Dtor = dyn_cast(MD)) -// m = wrap(CGM.GetAddrOfCXXDestructor(Dtor, Dtor_Complete)); -// else { + if (const CXXDestructorDecl *Dtor = dyn_cast(MD)) + m = wrap(CGM.GetAddrOfCXXDestructor(Dtor, Dtor_Complete)); + else { const FunctionProtoType *FPT = MD->getType()->getAs(); const llvm::Type *Ty = @@ -904,7 +904,7 @@ public: FPT->isVariadic()); m = wrap(CGM.GetAddrOfFunction(MD, Ty)); -// } + } OverrideMethod(MD, m, MorallyVirtual, Offset); } diff --git a/test/CodeGenCXX/virtual-base-cast.cpp b/test/CodeGenCXX/virtual-base-cast.cpp index 9a728a8224..a825120ad2 100644 --- a/test/CodeGenCXX/virtual-base-cast.cpp +++ b/test/CodeGenCXX/virtual-base-cast.cpp @@ -6,4 +6,4 @@ struct C : virtual B { virtual ~C(); }; void f(C *c) { A* a = c; -} \ No newline at end of file +} -- 2.40.0