Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 1 | //== ValueState.h - Path-Sens. "State" for tracking valuues -----*- C++ -*--==// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Ted Kremenek | d70b62e | 2008-02-08 20:29:23 +0000 | [diff] [blame] | 10 | // This files defines SymbolID, ExprBindKey, and ValueState. |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_CLANG_ANALYSIS_VALUESTATE_H |
| 15 | #define LLVM_CLANG_ANALYSIS_VALUESTATE_H |
| 16 | |
| 17 | // FIXME: Reduce the number of includes. |
| 18 | |
Ted Kremenek | cc409b7 | 2008-02-14 17:30:51 +0000 | [diff] [blame] | 19 | #include "clang/Analysis/PathSensitive/RValues.h" |
Ted Kremenek | 4d4dd85 | 2008-02-13 17:41:41 +0000 | [diff] [blame] | 20 | #include "clang/Analysis/PathSensitive/GRCoreEngine.h" |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 21 | #include "clang/AST/Expr.h" |
| 22 | #include "clang/AST/Decl.h" |
| 23 | #include "clang/AST/ASTContext.h" |
| 24 | #include "clang/Analysis/Analyses/LiveVariables.h" |
| 25 | |
| 26 | #include "llvm/Support/Casting.h" |
| 27 | #include "llvm/Support/DataTypes.h" |
| 28 | #include "llvm/ADT/APSInt.h" |
| 29 | #include "llvm/ADT/FoldingSet.h" |
| 30 | #include "llvm/ADT/ImmutableMap.h" |
| 31 | #include "llvm/ADT/SmallVector.h" |
| 32 | #include "llvm/ADT/SmallPtrSet.h" |
| 33 | #include "llvm/Support/Allocator.h" |
| 34 | #include "llvm/Support/Compiler.h" |
| 35 | #include "llvm/Support/Streams.h" |
| 36 | |
| 37 | #include <functional> |
| 38 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 39 | namespace clang { |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 40 | |
| 41 | //===----------------------------------------------------------------------===// |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 42 | // ValueState - An ImmutableMap type Stmt*/Decl*/Symbols to RVals. |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 43 | //===----------------------------------------------------------------------===// |
| 44 | |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 45 | namespace vstate { |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 46 | typedef llvm::ImmutableSet<llvm::APSInt*> IntSetTy; |
| 47 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 48 | typedef llvm::ImmutableMap<Expr*,RVal> ExprBindingsTy; |
| 49 | typedef llvm::ImmutableMap<VarDecl*,RVal> VarBindingsTy; |
| 50 | typedef llvm::ImmutableMap<SymbolID,IntSetTy> ConstNotEqTy; |
| 51 | typedef llvm::ImmutableMap<SymbolID,const llvm::APSInt*> ConstEqTy; |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 52 | } |
Ted Kremenek | 6f886bd | 2008-02-05 18:24:17 +0000 | [diff] [blame] | 53 | |
| 54 | /// ValueStateImpl - This class encapsulates the actual data values for |
| 55 | /// for a "state" in our symbolic value tracking. It is intended to be |
| 56 | /// used as a functional object; that is once it is created and made |
| 57 | /// "persistent" in a FoldingSet its values will never change. |
Ted Kremenek | a40ba02 | 2008-02-06 02:50:36 +0000 | [diff] [blame] | 58 | class ValueStateImpl : public llvm::FoldingSetNode { |
| 59 | private: |
| 60 | void operator=(const ValueStateImpl& R) const; |
| 61 | |
| 62 | public: |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 63 | vstate::ExprBindingsTy SubExprBindings; |
| 64 | vstate::ExprBindingsTy BlockExprBindings; |
Ted Kremenek | 53c641a | 2008-02-08 03:02:48 +0000 | [diff] [blame] | 65 | vstate::VarBindingsTy VarBindings; |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 66 | vstate::ConstNotEqTy ConstNotEq; |
| 67 | vstate::ConstEqTy ConstEq; |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 68 | |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 69 | /// This ctor is used when creating the first ValueStateImpl object. |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 70 | ValueStateImpl(vstate::ExprBindingsTy EB, vstate::VarBindingsTy VB, |
| 71 | vstate::ConstNotEqTy CNE, vstate::ConstEqTy CE) |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 72 | : SubExprBindings(EB), |
| 73 | BlockExprBindings(EB), |
| 74 | VarBindings(VB), |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 75 | ConstNotEq(CNE), |
| 76 | ConstEq(CE) {} |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 77 | |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 78 | /// Copy ctor - We must explicitly define this or else the "Next" ptr |
| 79 | /// in FoldingSetNode will also get copied. |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 80 | ValueStateImpl(const ValueStateImpl& RHS) |
Ted Kremenek | 6f886bd | 2008-02-05 18:24:17 +0000 | [diff] [blame] | 81 | : llvm::FoldingSetNode(), |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 82 | SubExprBindings(RHS.SubExprBindings), |
| 83 | BlockExprBindings(RHS.BlockExprBindings), |
Ted Kremenek | 53c641a | 2008-02-08 03:02:48 +0000 | [diff] [blame] | 84 | VarBindings(RHS.VarBindings), |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 85 | ConstNotEq(RHS.ConstNotEq), |
| 86 | ConstEq(RHS.ConstEq) {} |
Ted Kremenek | a40ba02 | 2008-02-06 02:50:36 +0000 | [diff] [blame] | 87 | |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 88 | /// Profile - Profile the contents of a ValueStateImpl object for use |
| 89 | /// in a FoldingSet. |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 90 | static void Profile(llvm::FoldingSetNodeID& ID, const ValueStateImpl& V) { |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 91 | V.SubExprBindings.Profile(ID); |
| 92 | V.BlockExprBindings.Profile(ID); |
Ted Kremenek | 53c641a | 2008-02-08 03:02:48 +0000 | [diff] [blame] | 93 | V.VarBindings.Profile(ID); |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 94 | V.ConstNotEq.Profile(ID); |
| 95 | V.ConstEq.Profile(ID); |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 96 | } |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 97 | |
| 98 | /// Profile - Used to profile the contents of this object for inclusion |
| 99 | /// in a FoldingSet. |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 100 | void Profile(llvm::FoldingSetNodeID& ID) const { |
| 101 | Profile(ID, *this); |
| 102 | } |
| 103 | |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 104 | }; |
| 105 | |
Ted Kremenek | 6f886bd | 2008-02-05 18:24:17 +0000 | [diff] [blame] | 106 | /// ValueState - This class represents a "state" in our symbolic value |
| 107 | /// tracking. It is really just a "smart pointer", wrapping a pointer |
| 108 | /// to ValueStateImpl object. Making this class a smart pointer means that its |
| 109 | /// size is always the size of a pointer, which allows easy conversion to |
Ted Kremenek | 4d4dd85 | 2008-02-13 17:41:41 +0000 | [diff] [blame] | 110 | /// void* when being handled by GRCoreEngine. It also forces us to unique states; |
Ted Kremenek | 6f886bd | 2008-02-05 18:24:17 +0000 | [diff] [blame] | 111 | /// consequently, a ValueStateImpl* with a specific address will always refer |
| 112 | /// to the unique state with those values. |
Ted Kremenek | a40ba02 | 2008-02-06 02:50:36 +0000 | [diff] [blame] | 113 | class ValueState { |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 114 | ValueStateImpl* Data; |
| 115 | public: |
Ted Kremenek | ed90021 | 2008-02-05 18:17:58 +0000 | [diff] [blame] | 116 | ValueState(ValueStateImpl* D) : Data(D) {} |
Ted Kremenek | a40ba02 | 2008-02-06 02:50:36 +0000 | [diff] [blame] | 117 | ValueState() : Data(0) {} |
Ted Kremenek | ed90021 | 2008-02-05 18:17:58 +0000 | [diff] [blame] | 118 | |
Ted Kremenek | cba2e43 | 2008-02-05 19:35:18 +0000 | [diff] [blame] | 119 | // Accessors. |
Ted Kremenek | ed90021 | 2008-02-05 18:17:58 +0000 | [diff] [blame] | 120 | ValueStateImpl* getImpl() const { return Data; } |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 121 | ValueStateImpl& operator*() { return *Data; } |
| 122 | ValueStateImpl* operator->() { return Data; } |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 123 | |
Ted Kremenek | cba2e43 | 2008-02-05 19:35:18 +0000 | [diff] [blame] | 124 | // Typedefs. |
Ted Kremenek | 862d5bb | 2008-02-06 00:54:14 +0000 | [diff] [blame] | 125 | typedef vstate::IntSetTy IntSetTy; |
Ted Kremenek | 016f52f | 2008-02-08 21:10:02 +0000 | [diff] [blame] | 126 | typedef vstate::ExprBindingsTy ExprBindingsTy; |
| 127 | typedef vstate::VarBindingsTy VarBindingsTy; |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 128 | typedef vstate::ConstNotEqTy ConstNotEqTy; |
| 129 | typedef vstate::ConstEqTy ConstEqTy; |
Ted Kremenek | 862d5bb | 2008-02-06 00:54:14 +0000 | [diff] [blame] | 130 | |
Ted Kremenek | cba2e43 | 2008-02-05 19:35:18 +0000 | [diff] [blame] | 131 | typedef llvm::SmallVector<ValueState,5> BufferTy; |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 132 | |
Ted Kremenek | 862d5bb | 2008-02-06 00:54:14 +0000 | [diff] [blame] | 133 | // Queries. |
| 134 | |
| 135 | bool isNotEqual(SymbolID sym, const llvm::APSInt& V) const; |
| 136 | const llvm::APSInt* getSymVal(SymbolID sym) const; |
| 137 | |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 138 | // Iterators. |
| 139 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 140 | typedef VarBindingsTy::iterator vb_iterator; |
| 141 | vb_iterator vb_begin() const { return Data->VarBindings.begin(); } |
| 142 | vb_iterator vb_end() const { return Data->VarBindings.end(); } |
| 143 | |
| 144 | typedef ExprBindingsTy::iterator seb_iterator; |
| 145 | seb_iterator seb_begin() const { return Data->SubExprBindings.begin(); } |
| 146 | seb_iterator seb_end() const { return Data->SubExprBindings.end(); } |
Ted Kremenek | 016f52f | 2008-02-08 21:10:02 +0000 | [diff] [blame] | 147 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 148 | typedef ExprBindingsTy::iterator beb_iterator; |
| 149 | beb_iterator beb_begin() const { return Data->BlockExprBindings.begin(); } |
| 150 | beb_iterator beb_end() const { return Data->BlockExprBindings.end(); } |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 151 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 152 | typedef ConstNotEqTy::iterator cne_iterator; |
| 153 | cne_iterator cne_begin() const { return Data->ConstNotEq.begin(); } |
| 154 | cne_iterator cne_end() const { return Data->ConstNotEq.end(); } |
Ted Kremenek | 90e1481 | 2008-02-14 23:25:54 +0000 | [diff] [blame] | 155 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 156 | typedef ConstEqTy::iterator ce_iterator; |
| 157 | ce_iterator ce_begin() const { return Data->ConstEq.begin(); } |
| 158 | ce_iterator ce_end() const { return Data->ConstEq.end(); } |
Ted Kremenek | 90e1481 | 2008-02-14 23:25:54 +0000 | [diff] [blame] | 159 | |
Ted Kremenek | ed90021 | 2008-02-05 18:17:58 +0000 | [diff] [blame] | 160 | // Profiling and equality testing. |
| 161 | |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 162 | bool operator==(const ValueState& RHS) const { |
| 163 | return Data == RHS.Data; |
| 164 | } |
| 165 | |
| 166 | static void Profile(llvm::FoldingSetNodeID& ID, const ValueState& V) { |
| 167 | ID.AddPointer(V.getImpl()); |
| 168 | } |
| 169 | |
| 170 | void Profile(llvm::FoldingSetNodeID& ID) const { |
| 171 | Profile(ID, *this); |
| 172 | } |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 173 | |
| 174 | void printDOT(std::ostream& Out) const; |
| 175 | void print(std::ostream& Out) const; |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 176 | void printStdErr() const { print(*llvm::cerr); } |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 177 | |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 178 | }; |
| 179 | |
| 180 | template<> struct GRTrait<ValueState> { |
| 181 | static inline void* toPtr(ValueState St) { |
| 182 | return reinterpret_cast<void*>(St.getImpl()); |
| 183 | } |
| 184 | static inline ValueState toState(void* P) { |
| 185 | return ValueState(static_cast<ValueStateImpl*>(P)); |
| 186 | } |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 187 | }; |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 188 | |
| 189 | class ValueStateManager { |
| 190 | public: |
| 191 | typedef ValueState StateTy; |
| 192 | |
| 193 | private: |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 194 | ValueState::IntSetTy::Factory ISetFactory; |
| 195 | ValueState::ExprBindingsTy::Factory EXFactory; |
| 196 | ValueState::VarBindingsTy::Factory VBFactory; |
| 197 | ValueState::ConstNotEqTy::Factory CNEFactory; |
| 198 | ValueState::ConstEqTy::Factory CEFactory; |
Ted Kremenek | 174aea4 | 2008-02-05 18:51:06 +0000 | [diff] [blame] | 199 | |
| 200 | /// StateSet - FoldingSet containing all the states created for analyzing |
| 201 | /// a particular function. This is used to unique states. |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 202 | llvm::FoldingSet<ValueStateImpl> StateSet; |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 203 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 204 | /// ValueMgr - Object that manages the data for all created RVals. |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 205 | ValueManager ValMgr; |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 206 | |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 207 | /// SymMgr - Object that manages the symbol information. |
| 208 | SymbolManager SymMgr; |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 209 | |
| 210 | /// Alloc - A BumpPtrAllocator to allocate states. |
| 211 | llvm::BumpPtrAllocator& Alloc; |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 212 | |
| 213 | private: |
| 214 | |
| 215 | ValueState::ExprBindingsTy Remove(ValueState::ExprBindingsTy B, Expr* E) { |
| 216 | return EXFactory.Remove(B, E); |
| 217 | } |
| 218 | |
| 219 | ValueState::VarBindingsTy Remove(ValueState::VarBindingsTy B, VarDecl* V) { |
| 220 | return VBFactory.Remove(B, V); |
| 221 | } |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 222 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 223 | inline ValueState::ExprBindingsTy Remove(const ValueStateImpl& V, Expr* E) { |
| 224 | return Remove(V.BlockExprBindings, E); |
| 225 | } |
| 226 | |
| 227 | inline ValueState::VarBindingsTy Remove(const ValueStateImpl& V, VarDecl* D) { |
| 228 | return Remove(V.VarBindings, D); |
| 229 | } |
| 230 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 231 | ValueState BindVar(ValueState St, VarDecl* D, RVal V); |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 232 | ValueState UnbindVar(ValueState St, VarDecl* D); |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 233 | |
| 234 | public: |
Ted Kremenek | 9153f73 | 2008-02-05 07:17:49 +0000 | [diff] [blame] | 235 | ValueStateManager(ASTContext& Ctx, llvm::BumpPtrAllocator& alloc) |
Ted Kremenek | 8158a0e | 2008-02-11 23:12:59 +0000 | [diff] [blame] | 236 | : ISetFactory(alloc), |
| 237 | EXFactory(alloc), |
| 238 | VBFactory(alloc), |
| 239 | CNEFactory(alloc), |
| 240 | CEFactory(alloc), |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 241 | ValMgr(Ctx, alloc), |
| 242 | Alloc(alloc) {} |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 243 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 244 | ValueState getInitialState(); |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 245 | |
| 246 | ValueManager& getValueManager() { return ValMgr; } |
| 247 | SymbolManager& getSymbolManager() { return SymMgr; } |
| 248 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 249 | ValueState RemoveDeadBindings(ValueState St, Stmt* Loc, |
| 250 | const LiveVariables& Liveness); |
Ted Kremenek | b87d909 | 2008-02-08 19:17:19 +0000 | [diff] [blame] | 251 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 252 | ValueState RemoveSubExprBindings(ValueState St) { |
| 253 | ValueStateImpl NewSt = *St; |
| 254 | NewSt.SubExprBindings = EXFactory.GetEmptyMap(); |
| 255 | return getPersistentState(NewSt); |
| 256 | } |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 257 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 258 | ValueState SetRVal(ValueState St, Expr* E, bool isBlkExpr, RVal V); |
| 259 | ValueState SetRVal(ValueState St, LVal LV, RVal V); |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 260 | |
Ted Kremenek | aa1c4e5 | 2008-02-21 18:02:17 +0000 | [diff] [blame^] | 261 | RVal GetRVal(ValueState St, Expr* E, bool* hasVal = NULL); |
| 262 | RVal GetRVal(ValueState St, const LVal& LV, QualType T = QualType()); |
| 263 | RVal GetLVal(ValueState St, Expr* E); |
Ted Kremenek | b87d909 | 2008-02-08 19:17:19 +0000 | [diff] [blame] | 264 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 265 | ValueState getPersistentState(const ValueStateImpl& Impl); |
Ted Kremenek | 016f52f | 2008-02-08 21:10:02 +0000 | [diff] [blame] | 266 | |
Ted Kremenek | e7d2211 | 2008-02-11 19:21:59 +0000 | [diff] [blame] | 267 | ValueState AddEQ(ValueState St, SymbolID sym, const llvm::APSInt& V); |
| 268 | ValueState AddNE(ValueState St, SymbolID sym, const llvm::APSInt& V); |
Ted Kremenek | e070a1d | 2008-02-04 21:59:01 +0000 | [diff] [blame] | 269 | }; |
| 270 | |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 271 | } // end clang namespace |
| 272 | |
Ted Kremenek | a90ccfe | 2008-01-31 19:34:24 +0000 | [diff] [blame] | 273 | #endif |