summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index f236eb42538..d335e2b4f82 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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;
}
OpenPOWER on IntegriCloud