From 7e70d6803d08725ec8b6d59240c35c811e5c2bb0 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 18 Aug 2015 22:40:54 +0000 Subject: Devirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically llvm-svn: 245378 --- clang/lib/CodeGen/CGClass.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CGClass.cpp') diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index fea72f6818e..ea943c2986d 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -345,7 +345,7 @@ llvm::Value *CodeGenFunction::GetVTTParameter(GlobalDecl GD, namespace { /// Call the destructor for a direct base class. - struct CallBaseDtor : EHScopeStack::Cleanup { + struct CallBaseDtor final : EHScopeStack::Cleanup { const CXXRecordDecl *BaseClass; bool BaseIsVirtual; CallBaseDtor(const CXXRecordDecl *Base, bool BaseIsVirtual) @@ -1526,7 +1526,7 @@ void CodeGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &Args) namespace { /// Call the operator delete associated with the current destructor. - struct CallDtorDelete : EHScopeStack::Cleanup { + struct CallDtorDelete final : EHScopeStack::Cleanup { CallDtorDelete() {} void Emit(CodeGenFunction &CGF, Flags flags) override { @@ -1537,7 +1537,7 @@ namespace { } }; - struct CallDtorDeleteConditional : EHScopeStack::Cleanup { + struct CallDtorDeleteConditional final : EHScopeStack::Cleanup { llvm::Value *ShouldDeleteCondition; public: CallDtorDeleteConditional(llvm::Value *ShouldDeleteCondition) @@ -1563,7 +1563,7 @@ namespace { } }; - class DestroyField : public EHScopeStack::Cleanup { + class DestroyField final : public EHScopeStack::Cleanup { const FieldDecl *field; CodeGenFunction::Destroyer *destroyer; bool useEHCleanupForArray; @@ -1933,7 +1933,7 @@ CodeGenFunction::EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor, } namespace { - struct CallDelegatingCtorDtor : EHScopeStack::Cleanup { + struct CallDelegatingCtorDtor final : EHScopeStack::Cleanup { const CXXDestructorDecl *Dtor; llvm::Value *Addr; CXXDtorType Type; @@ -1987,7 +1987,7 @@ void CodeGenFunction::EmitCXXDestructorCall(const CXXDestructorDecl *DD, } namespace { - struct CallLocalDtor : EHScopeStack::Cleanup { + struct CallLocalDtor final : EHScopeStack::Cleanup { const CXXDestructorDecl *Dtor; llvm::Value *Addr; -- cgit v1.2.3