diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-23 17:59:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-23 17:59:02 +0000 |
commit | f1ac9f6a7f70508c824c373e9d3d652a6e7bc418 (patch) | |
tree | 0d77a07a72eb9797843ecd5dca4a9b23fb3d0fc5 /include/llvm/Analysis/DataStructure/DataStructure.h | |
parent | dedcc76fdaec2dbbf8de27b8b1dce2e18d20fc59 (diff) |
Allow comparison against null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DataStructure.h')
-rw-r--r-- | include/llvm/Analysis/DataStructure/DataStructure.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index 5c981ce8fe..57bf0eb31a 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -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; } |