[cfe-commits] r108972 - /cfe/trunk/lib/CodeGen/CodeGenFunction.h

John McCall rjmccall at apple.com
Tue Jul 20 17:40:03 PDT 2010


Author: rjmccall
Date: Tue Jul 20 19:40:03 2010
New Revision: 108972

URL: http://llvm.org/viewvc/llvm-project?rev=108972&view=rev
Log:
Add a little helper method which will be useful soon.


Modified:
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=108972&r1=108971&r2=108972&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Tue Jul 20 19:40:03 2010
@@ -117,6 +117,10 @@
 
     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;
     }





More information about the cfe-commits mailing list