diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-28 05:15:23 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-28 05:15:23 +0000 |
commit | c540b261ac553b91840146eaa3fee3f11b1013a7 (patch) | |
tree | 7ff3be19ade2c8e76259851f2e2826679626a2fd | |
parent | 21ec0e4c5db85e45b59cafabca66d640e0ee2dcc (diff) |
Add isGlobalsRegion() predicate to MemRegionManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/PathSensitive/MemRegion.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/MemRegion.h b/include/clang/Analysis/PathSensitive/MemRegion.h index 82f0e91896..053ad44053 100644 --- a/include/clang/Analysis/PathSensitive/MemRegion.h +++ b/include/clang/Analysis/PathSensitive/MemRegion.h @@ -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. |