diff options
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; } |