1 //===- StoreRef.h - Smart pointer for store objects -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defined the type StoreRef.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H
15 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H
24 /// Store - This opaque type encapsulates an immutable mapping from
25 /// locations to values. At a high-level, it represents the symbolic
26 /// memory model. Different subclasses of StoreManager may choose
27 /// different types to represent the locations and values.
28 using Store = const void *;
35 StoreRef(Store store, StoreManager &smgr);
36 StoreRef(const StoreRef &sr);
37 StoreRef &operator=(StoreRef const &newStore);
40 bool operator==(const StoreRef &x) const {
41 assert(&mgr == &x.mgr);
42 return x.store == store;
45 bool operator!=(const StoreRef &x) const { return !operator==(x); }
47 Store getStore() const { return store; }
48 const StoreManager &getStoreManager() const { return mgr; }
54 #endif // LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H