summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-21 00:40:03 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-21 00:40:03 +0000
commit8f510411849599853e94cf010bb06f34a879452c (patch)
treece53fb98e5cd82791743865c16ec658ae2f4d22d /clang/lib/CodeGen/CodeGenFunction.h
parenta2489d1bb6b82c96fab826b8b52073e8631275fb (diff)
downloadbcm5719-llvm-8f510411849599853e94cf010bb06f34a879452c.tar.gz
bcm5719-llvm-8f510411849599853e94cf010bb06f34a879452c.zip
Add a little helper method which will be useful soon.
llvm-svn: 108972
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-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