aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/FoldingSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/FoldingSet.h')
-rw-r--r--include/llvm/ADT/FoldingSet.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 7ade167..52d10c1 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -23,9 +23,6 @@
#include "llvm/Support/DataTypes.h"
namespace llvm {
- class APFloat;
- class APInt;
-
/// This folding set used for two purposes:
/// 1. Given information about a node we want to create, look up the unique
/// instance of the node in the set. If the node already exists, return
@@ -110,6 +107,8 @@ class FoldingSetNodeID;
/// back to the bucket to facilitate node removal.
///
class FoldingSetImpl {
+ virtual void anchor(); // Out of line virtual method.
+
protected:
/// Buckets - Array of bucket chains.
///
@@ -123,10 +122,11 @@ protected:
/// is greater than twice the number of buckets.
unsigned NumNodes;
-public:
+ ~FoldingSetImpl();
+
explicit FoldingSetImpl(unsigned Log2InitSize = 6);
- virtual ~FoldingSetImpl();
+public:
//===--------------------------------------------------------------------===//
/// Node - This class is used to maintain the singly linked bucket list in
/// a folding set.
@@ -393,7 +393,7 @@ DefaultContextualFoldingSetTrait<T, Ctx>::ComputeHash(T &X,
/// implementation of the folding set to the node class T. T must be a
/// subclass of FoldingSetNode and implement a Profile function.
///
-template<class T> class FoldingSet : public FoldingSetImpl {
+template <class T> class FoldingSet final : public FoldingSetImpl {
private:
/// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a
/// way to convert nodes into a unique specifier.
@@ -463,7 +463,7 @@ public:
/// function with signature
/// void Profile(llvm::FoldingSetNodeID &, Ctx);
template <class T, class Ctx>
-class ContextualFoldingSet : public FoldingSetImpl {
+class ContextualFoldingSet final : public FoldingSetImpl {
// Unfortunately, this can't derive from FoldingSet<T> because the
// construction vtable for FoldingSet<T> requires
// FoldingSet<T>::GetNodeProfile to be instantiated, which in turn