aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-26 02:32:19 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-26 02:32:19 +0000
commit9dce71ff2bb3016827f519152bd54830c20bb1da (patch)
tree0e8900f8ff97328d4648236836a0fb605f0ff3c3 /lib/Analysis/GRState.cpp
parenta94822e8937eeb340a653b88024f805a07a2d2ee (diff)
Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89926 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r--lib/Analysis/GRState.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 23ee0b2258..5284d65e9a 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -308,6 +308,27 @@ bool GRState::scanReachableSymbols(SVal val, SymbolVisitor& visitor) const {
return S.scan(val);
}
+bool GRState::scanReachableSymbols(const SVal *I, const SVal *E,
+ SymbolVisitor &visitor) const {
+ ScanReachableSymbols S(this, visitor);
+ for ( ; I != E; ++I) {
+ if (S.scan(*I))
+ return true;
+ }
+ return false;
+}
+
+bool GRState::scanReachableSymbols(const MemRegion * const *I,
+ const MemRegion * const *E,
+ SymbolVisitor &visitor) const {
+ ScanReachableSymbols S(this, visitor);
+ for ( ; I != E; ++I) {
+ if (S.scan(*I))
+ return true;
+ }
+ return false;
+}
+
//===----------------------------------------------------------------------===//
// Queries.
//===----------------------------------------------------------------------===//