aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Use.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-11 04:18:11 +0000
committerChris Lattner <sabre@nondot.org>2007-10-11 04:18:11 +0000
commit3ef437d137afe7409b93310a2092a2f8a8dbfcca (patch)
treeb179649549eed3d0516011a9f586ea518400dc53 /include/llvm/Use.h
parentbdc2154986f6f302ef59b506013b73f82a7a5ee5 (diff)
downloadexternal_llvm-3ef437d137afe7409b93310a2092a2f8a8dbfcca.zip
external_llvm-3ef437d137afe7409b93310a2092a2f8a8dbfcca.tar.gz
external_llvm-3ef437d137afe7409b93310a2092a2f8a8dbfcca.tar.bz2
Add a new use_iterator::atEnd() method, which allows us to shrink
pred_iterator down to a single ivar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Use.h')
-rw-r--r--include/llvm/Use.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Use.h b/include/llvm/Use.h
index c88d41f..ce13648 100644
--- a/include/llvm/Use.h
+++ b/include/llvm/Use.h
@@ -120,6 +120,9 @@ public:
bool operator!=(const _Self &x) const {
return !operator==(x);
}
+
+ /// atEnd - return true if this iterator is equal to use_end() on the value.
+ bool atEnd() const { return U == 0; }
// Iterator traversal: forward iteration only
_Self &operator++() { // Preincrement