[llvm] r199702 - Add operator!= for FoldingSetNodeID and FoldingSetNodeIDRef. Implementation in
Nick Lewycky
nicholas at mxc.ca
Mon Jan 20 17:29:37 PST 2014
Author: nicholas
Date: Mon Jan 20 19:29:37 2014
New Revision: 199702
URL: http://llvm.org/viewvc/llvm-project?rev=199702&view=rev
Log:
Add operator!= for FoldingSetNodeID and FoldingSetNodeIDRef. Implementation in
the header forwards to operator== which is not in the header.
Modified:
llvm/trunk/include/llvm/ADT/FoldingSet.h
Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=199702&r1=199701&r2=199702&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/FoldingSet.h (original)
+++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon Jan 20 19:29:37 2014
@@ -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;
More information about the llvm-commits
mailing list