]> granicus.if.org Git - clang/commitdiff
Add isGlobalsRegion() predicate to MemRegionManager.
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 28 Oct 2008 05:15:23 +0000 (05:15 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 28 Oct 2008 05:15:23 +0000 (05:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/MemRegion.h

index 82f0e9189602c65be25d7423d448b57de6a31d36..053ad44053393d82b1874b850011a861d2333da0 100644 (file)
@@ -418,6 +418,11 @@ public:
   /// getUnknownRegion - Retrieve the memory region associated with unknown
   /// memory space.
   MemSpaceRegion* getUnknownRegion();
+
+  bool isGlobalsRegion(const MemRegion* R) { 
+    assert(R && globals);
+    return R == globals; 
+  }
   
   /// getCompoundLiteralRegion - Retrieve the region associated with a
   ///  given CompoundLiteral.