diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2014-01-21 01:29:37 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2014-01-21 01:29:37 +0000 |
| commit | 47a79816b8c597b93528b21f10d8e8319fbcfa12 (patch) | |
| tree | 1db5c97aaf7cfdb9581c61b1256151204daf51ee | |
| parent | 4f2c198617bcd36f3abe462d214cab5c23690239 (diff) | |
| download | bcm5719-llvm-47a79816b8c597b93528b21f10d8e8319fbcfa12.tar.gz bcm5719-llvm-47a79816b8c597b93528b21f10d8e8319fbcfa12.zip | |
Add operator!= for FoldingSetNodeID and FoldingSetNodeIDRef. Implementation in
the header forwards to operator== which is not in the header.
llvm-svn: 199702
| -rw-r--r-- | llvm/include/llvm/ADT/FoldingSet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h index 1b2c94c35f8..a056d667c66 100644 --- a/llvm/include/llvm/ADT/FoldingSet.h +++ b/llvm/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; |

