aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-08-18 22:40:54 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-08-18 22:40:54 +0000
commit7e70d6803d08725ec8b6d59240c35c811e5c2bb0 (patch)
tree56d110a85b0b92a2706c98788b8ca501b0d07c30 /clang/lib/CodeGen/CGDecl.cpp
parentd85f7010ccf965399f6b1e4e3e708b041f70a7ed (diff)
downloadllvm-7e70d6803d08725ec8b6d59240c35c811e5c2bb0.zip
llvm-7e70d6803d08725ec8b6d59240c35c811e5c2bb0.tar.gz
llvm-7e70d6803d08725ec8b6d59240c35c811e5c2bb0.tar.bz2
Devirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically
llvm-svn: 245378
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index ebd1776..fc25c46 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -400,7 +400,7 @@ void CodeGenFunction::EmitStaticVarDecl(const VarDecl &D,
}
namespace {
- struct DestroyObject : EHScopeStack::Cleanup {
+ struct DestroyObject final : EHScopeStack::Cleanup {
DestroyObject(llvm::Value *addr, QualType type,
CodeGenFunction::Destroyer *destroyer,
bool useEHCleanupForArray)
@@ -421,7 +421,7 @@ namespace {
}
};
- struct DestroyNRVOVariable : EHScopeStack::Cleanup {
+ struct DestroyNRVOVariable final : EHScopeStack::Cleanup {
DestroyNRVOVariable(llvm::Value *addr,
const CXXDestructorDecl *Dtor,
llvm::Value *NRVOFlag)
@@ -454,7 +454,7 @@ namespace {
}
};
- struct CallStackRestore : EHScopeStack::Cleanup {
+ struct CallStackRestore final : EHScopeStack::Cleanup {
llvm::Value *Stack;
CallStackRestore(llvm::Value *Stack) : Stack(Stack) {}
void Emit(CodeGenFunction &CGF, Flags flags) override {
@@ -464,7 +464,7 @@ namespace {
}
};
- struct ExtendGCLifetime : EHScopeStack::Cleanup {
+ struct ExtendGCLifetime final : EHScopeStack::Cleanup {
const VarDecl &Var;
ExtendGCLifetime(const VarDecl *var) : Var(*var) {}
@@ -479,7 +479,7 @@ namespace {
}
};
- struct CallCleanupFunction : EHScopeStack::Cleanup {
+ struct CallCleanupFunction final : EHScopeStack::Cleanup {
llvm::Constant *CleanupFn;
const CGFunctionInfo &FnInfo;
const VarDecl &Var;
@@ -513,7 +513,7 @@ namespace {
};
/// A cleanup to call @llvm.lifetime.end.
- class CallLifetimeEnd : public EHScopeStack::Cleanup {
+ class CallLifetimeEnd final : public EHScopeStack::Cleanup {
llvm::Value *Addr;
llvm::Value *Size;
public:
@@ -1548,7 +1548,7 @@ namespace {
/// RegularPartialArrayDestroy - a cleanup which performs a partial
/// array destroy where the end pointer is regularly determined and
/// does not need to be loaded from a local.
- class RegularPartialArrayDestroy : public EHScopeStack::Cleanup {
+ class RegularPartialArrayDestroy final : public EHScopeStack::Cleanup {
llvm::Value *ArrayBegin;
llvm::Value *ArrayEnd;
QualType ElementType;
@@ -1569,7 +1569,7 @@ namespace {
/// IrregularPartialArrayDestroy - a cleanup which performs a
/// partial array destroy where the end pointer is irregularly
/// determined and must be loaded from a local.
- class IrregularPartialArrayDestroy : public EHScopeStack::Cleanup {
+ class IrregularPartialArrayDestroy final : public EHScopeStack::Cleanup {
llvm::Value *ArrayBegin;
llvm::Value *ArrayEndPointer;
QualType ElementType;
@@ -1641,7 +1641,7 @@ namespace {
/// function. This is used to balance out the incoming +1 of a
/// ns_consumed argument when we can't reasonably do that just by
/// not doing the initial retain for a __block argument.
- struct ConsumeARCParameter : EHScopeStack::Cleanup {
+ struct ConsumeARCParameter final : EHScopeStack::Cleanup {
ConsumeARCParameter(llvm::Value *param,
ARCPreciseLifetime_t precise)
: Param(param), Precise(precise) {}