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_GR_STOREREF_H
15 #define LLVM_CLANG_GR_STOREREF_H
22 /// Store - This opaque type encapsulates an immutable mapping from
23 /// locations to values. At a high-level, it represents the symbolic
24 /// memory model. Different subclasses of StoreManager may choose
25 /// different types to represent the locations and values.
26 typedef const void *Store;
34 StoreRef(Store, StoreManager &);
35 StoreRef(const StoreRef &);
36 StoreRef &operator=(StoreRef const &);
38 bool operator==(const StoreRef &x) const {
39 assert(&mgr == &x.mgr);
40 return x.store == store;
42 bool operator!=(const StoreRef &x) const { return !operator==(x); }
46 Store getStore() const { return store; }
47 const StoreManager &getStoreManager() const { return mgr; }