Allow comparison against null

llvm-svn: 3009
This commit is contained in:
Chris Lattner 2002-07-23 17:59:02 +00:00
parent 5d33f9d4f3
commit 301dd0e990
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ public:
bool operator==(const DSNode *Node) const { return N == Node; }
bool operator!=(const DSNode *Node) const { return N != Node; }
// Avoid having comparisons to null cause errors...
bool operator==(int X) const { return operator==((DSNode*)X); }
// Allow explicit conversion to DSNode...
DSNode *get() { return N; }
const DSNode *get() const { return N; }