summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/CFLAliasAnalysis.cpp4
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp2
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp2
4 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/CFLAliasAnalysis.cpp b/llvm/lib/Analysis/CFLAliasAnalysis.cpp
index fe1c088886b..b76cbb490cf 100644
--- a/llvm/lib/Analysis/CFLAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/CFLAliasAnalysis.cpp
@@ -153,15 +153,13 @@ struct FunctionInfo {
struct CFLAliasAnalysis;
-struct FunctionHandle : public CallbackVH {
+struct FunctionHandle final : public CallbackVH {
FunctionHandle(Function *Fn, CFLAliasAnalysis *CFLAA)
: CallbackVH(Fn), CFLAA(CFLAA) {
assert(Fn != nullptr);
assert(CFLAA != nullptr);
}
- ~FunctionHandle() override {}
-
void deleted() override { removeSelfFromCache(); }
void allUsesReplacedWith(Value *) override { removeSelfFromCache(); }
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 77e85353586..f70833b1629 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -295,7 +295,7 @@ raw_ostream &operator<<(raw_ostream &OS, const LVILatticeVal &Val) {
namespace {
/// A callback value handle updates the cache when values are erased.
class LazyValueInfoCache;
- struct LVIValueHandle : public CallbackVH {
+ struct LVIValueHandle final : public CallbackVH {
LazyValueInfoCache *Parent;
LVIValueHandle(Value *V, LazyValueInfoCache *P)
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 6a206249d83..4d5bd83a032 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -35,7 +35,7 @@ char MachineModuleInfo::ID = 0;
MachineModuleInfoImpl::~MachineModuleInfoImpl() {}
namespace llvm {
-class MMIAddrLabelMapCallbackPtr : CallbackVH {
+class MMIAddrLabelMapCallbackPtr final : CallbackVH {
MMIAddrLabelMap *Map;
public:
MMIAddrLabelMapCallbackPtr() : Map(nullptr) {}
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 77ea6749091..136a2d5f037 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -95,7 +95,7 @@ ExecutionEngine::~ExecutionEngine() {
namespace {
/// \brief Helper class which uses a value handler to automatically deletes the
/// memory block when the GlobalVariable is destroyed.
-class GVMemoryBlock : public CallbackVH {
+class GVMemoryBlock final : public CallbackVH {
GVMemoryBlock(const GlobalVariable *GV)
: CallbackVH(const_cast<GlobalVariable*>(GV)) {}
OpenPOWER on IntegriCloud