GCC 3.1 changes
authorChris Lattner <sabre@nondot.org>
Wed, 24 Jul 2002 22:34:01 +0000 (22:34 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Jul 2002 22:34:01 +0000 (22:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3070 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DataStructure.h
include/llvm/Analysis/DataStructure/DataStructure.h

index 674a5f0a1edb2561e6475e2db37e728406b56fe3..b008b6e6a721397573efef9eeb69f309d67d65a7 100644 (file)
@@ -49,9 +49,15 @@ public:
   bool operator!=(const DSNodeHandle &H) const { return N != H.N; }
   bool operator==(const DSNode *Node) const { return N == Node; }
   bool operator!=(const DSNode *Node) const { return N != Node; }
+  bool operator==(DSNode *Node) const { return N == Node; }
+  bool operator!=(DSNode *Node) const { return N != Node; }
 
   // Avoid having comparisons to null cause errors...
-  bool operator==(int X) const { return operator==((DSNode*)X); }
+  bool operator==(int X) const {
+    assert(X == 0 && "Bad comparison!");
+    return operator==((DSNode*)0);
+  }
+  bool operator!=(int X) const { return !operator==(X); }
 
   // Allow explicit conversion to DSNode...
   DSNode *get() { return N; }
index 674a5f0a1edb2561e6475e2db37e728406b56fe3..b008b6e6a721397573efef9eeb69f309d67d65a7 100644 (file)
@@ -49,9 +49,15 @@ public:
   bool operator!=(const DSNodeHandle &H) const { return N != H.N; }
   bool operator==(const DSNode *Node) const { return N == Node; }
   bool operator!=(const DSNode *Node) const { return N != Node; }
+  bool operator==(DSNode *Node) const { return N == Node; }
+  bool operator!=(DSNode *Node) const { return N != Node; }
 
   // Avoid having comparisons to null cause errors...
-  bool operator==(int X) const { return operator==((DSNode*)X); }
+  bool operator==(int X) const {
+    assert(X == 0 && "Bad comparison!");
+    return operator==((DSNode*)0);
+  }
+  bool operator!=(int X) const { return !operator==(X); }
 
   // Allow explicit conversion to DSNode...
   DSNode *get() { return N; }