diff options
author | John McCall <rjmccall@apple.com> | 2010-07-21 00:40:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-07-21 00:40:03 +0000 |
commit | 1bda662cb37d9fe24be4b3cf8ea0f4e550e1f889 (patch) | |
tree | 20d383c2c9eef0c47dd02b3065914eaf325949d3 /lib/CodeGen/CodeGenFunction.h | |
parent | 971dd4498f1118abd12e001add0df06e97669b61 (diff) |
Add a little helper method which will be useful soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index f236eb4253..d335e2b4f8 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -117,6 +117,10 @@ public: bool isValid() const { return Size >= 0; } + /// \return true if this scope is (non-strictly) nested within the + /// given scope, assuming they're both valid + bool isWithin(stable_iterator I) const { return Size <= I.Size; } + friend bool operator==(stable_iterator A, stable_iterator B) { return A.Size == B.Size; } |