aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Analysis/PathSensitive/GRState.h13
-rw-r--r--include/clang/Analysis/PathSensitive/Store.h9
2 files changed, 22 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRState.h b/include/clang/Analysis/PathSensitive/GRState.h
index 0ecfb27c16..8570a9d0c2 100644
--- a/include/clang/Analysis/PathSensitive/GRState.h
+++ b/include/clang/Analysis/PathSensitive/GRState.h
@@ -381,6 +381,19 @@ public:
const GRState* addGDM(const GRState* St, void* Key, void* Data);
// Methods that query & manipulate the Store.
+
+ /// getBindings - Returns all store bindings in the specified state that bind
+ /// to the specified symbolic value.
+ void getBindings(llvm::SmallVectorImpl<store::Binding>& bindings,
+ const GRState* St, SymbolID Sym) {
+ StMgr->getBindings(bindings, St->getStore(), Sym);
+ }
+
+ /// BindingAsString - Returns a string representing the given store binding.
+ std::string BindingAsString(store::Binding binding) {
+ return StMgr->BindingAsString(binding);
+ }
+
RVal GetRVal(const GRState* St, LVal LV, QualType T = QualType()) {
return StMgr->GetRVal(St->getStore(), LV, T);
}
diff --git a/include/clang/Analysis/PathSensitive/Store.h b/include/clang/Analysis/PathSensitive/Store.h
index 4f16901972..d91dac1fe4 100644
--- a/include/clang/Analysis/PathSensitive/Store.h
+++ b/include/clang/Analysis/PathSensitive/Store.h
@@ -18,6 +18,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/SmallVector.h"
#include <vector>
#include <iosfwd>
@@ -124,6 +125,14 @@ public:
virtual void print(Store store, std::ostream& Out,
const char* nl, const char *sep) = 0;
+ /// getBindings - Returns all bindings in the specified store that bind
+ /// to the specified symbolic value.
+ virtual void getBindings(llvm::SmallVectorImpl<store::Binding>& bindings,
+ Store store, SymbolID Sym) = 0;
+
+ /// BindingAsString - Returns a string representing the given binding.
+ virtual std::string BindingAsString(store::Binding binding) = 0;
+
/// getExtent - Returns the size of the region in bits.
virtual store::RegionExtent getExtent(store::Region R) =0;
};