summaryrefslogtreecommitdiff
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-08 04:25:29 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-08 04:25:29 +0000
commit0d651e0c9d47a459b91755ccf711119f5b085dc5 (patch)
tree9e98af8726453a58c948a88fbddd0ccf835b4f52 /include/llvm/ADT
parenta34434184915cf869e2daf26a9d15483b7981aaa (diff)
downloadllvm-0d651e0c9d47a459b91755ccf711119f5b085dc5.tar.gz
llvm-0d651e0c9d47a459b91755ccf711119f5b085dc5.tar.bz2
llvm-0d651e0c9d47a459b91755ccf711119f5b085dc5.tar.xz
Add operator< for FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/FoldingSet.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index ba415ac2d6..375d84abeb 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -278,6 +278,10 @@ public:
bool operator==(FoldingSetNodeIDRef) const;
+ /// Used to compare the "ordering" of two nodes as defined by the
+ /// profiled bits and their ordering defined by memcmp().
+ bool operator<(FoldingSetNodeIDRef) const;
+
const unsigned *getData() const { return Data; }
size_t getSize() const { return Size; }
};
@@ -327,6 +331,11 @@ public:
bool operator==(const FoldingSetNodeID &RHS) const;
bool operator==(const FoldingSetNodeIDRef RHS) const;
+ /// Used to compare the "ordering" of two nodes as defined by the
+ /// profiled bits and their ordering defined by memcmp().
+ bool operator<(const FoldingSetNodeID &RHS) const;
+ bool operator<(const FoldingSetNodeIDRef RHS) const;
+
/// Intern - Copy this node's data to a memory region allocated from the
/// given allocator and return a FoldingSetNodeIDRef describing the
/// interned data.