summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-01-21 01:29:37 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-01-21 01:29:37 +0000
commit665b92322af8f1c4b436dd7ba49e9dd51e06c583 (patch)
tree10ec2549d16f514026e5f9f3f859bbf57d3b022a /include
parent527d783837d7b9759d6c88057e26df606e3c45a9 (diff)
downloadllvm-665b92322af8f1c4b436dd7ba49e9dd51e06c583.tar.gz
llvm-665b92322af8f1c4b436dd7ba49e9dd51e06c583.tar.bz2
llvm-665b92322af8f1c4b436dd7ba49e9dd51e06c583.tar.xz
Add operator!= for FoldingSetNodeID and FoldingSetNodeIDRef. Implementation in
the header forwards to operator== which is not in the header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/FoldingSet.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 1b2c94c35f..a056d667c6 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -278,6 +278,8 @@ public:
bool operator==(FoldingSetNodeIDRef) const;
+ bool operator!=(FoldingSetNodeIDRef RHS) const { return !(*this == RHS); }
+
/// Used to compare the "ordering" of two nodes as defined by the
/// profiled bits and their ordering defined by memcmp().
bool operator<(FoldingSetNodeIDRef) const;
@@ -331,6 +333,9 @@ public:
bool operator==(const FoldingSetNodeID &RHS) const;
bool operator==(const FoldingSetNodeIDRef RHS) const;
+ bool operator!=(const FoldingSetNodeID &RHS) const { return !(*this == RHS); }
+ bool operator!=(const FoldingSetNodeIDRef RHS) const { return !(*this ==RHS);}
+
/// 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;