From: Ted Kremenek Date: Fri, 8 Feb 2008 19:08:13 +0000 (+0000) Subject: Removed ability to create symbol bindings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=071679dcace879f3ec861b7b2fb1ce44f4717538;p=clang Removed ability to create symbol bindings in VarKey and VariableBindingsTy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46887 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp index 66a320b16d..75edb911e6 100644 --- a/Analysis/GRConstants.cpp +++ b/Analysis/GRConstants.cpp @@ -520,8 +520,7 @@ GRConstants::StateTy GRConstants::RemoveDeadBindings(Stmt* Loc, StateTy M) { llvm::SmallVector WList; - for (StateTy::vb_iterator I = M.begin(), E = M.end(); - I!=E && !I.getKey().isSymbol(); ++I) { + for (StateTy::vb_iterator I = M.begin(), E = M.end(); I!=E ; ++I) { // Remove old bindings for subexpressions. if (I.getKey().isSubExpr()) { diff --git a/Analysis/ValueState.h b/Analysis/ValueState.h index 388231090e..4de4f2e3f9 100644 --- a/Analysis/ValueState.h +++ b/Analysis/ValueState.h @@ -55,15 +55,9 @@ public: } inline void* getPtr() const { - assert (getKind() != IsSymbol); return reinterpret_cast(Raw & ~Mask); } - inline SymbolID getSymbolID() const { - assert (getKind() == IsSymbol); - return Raw >> 2; - } - VarBindKey(const ValueDecl* VD) : Raw(reinterpret_cast(VD) | IsDecl) { assert(VD && "ValueDecl cannot be NULL."); @@ -74,27 +68,17 @@ public: assert(S && "Tracked statement cannot be NULL."); } - VarBindKey(SymbolID V) - : Raw((V << 2) | IsSymbol) {} - - bool isSymbol() const { return getKind() == IsSymbol; } bool isSubExpr() const { return getKind() == IsSubExpr; } bool isBlkExpr() const { return getKind() == IsBlkExpr; } bool isDecl() const { return getKind() == IsDecl; } bool isStmt() const { return getKind() <= IsBlkExpr; } inline void Profile(llvm::FoldingSetNodeID& ID) const { - ID.AddInteger(isSymbol() ? 1 : 0); - - if (isSymbol()) - ID.AddInteger(getSymbolID()); - else - ID.AddPointer(getPtr()); + ID.AddPointer(getPtr()); } inline bool operator==(const VarBindKey& X) const { - return isSymbol() ? getSymbolID() == X.getSymbolID() - : getPtr() == X.getPtr(); + return getPtr() == X.getPtr(); } inline bool operator!=(const VarBindKey& X) const { @@ -102,9 +86,6 @@ public: } inline bool operator<(const VarBindKey& X) const { - if (isSymbol()) - return X.isSymbol() ? getSymbolID() < X.getSymbolID() : false; - return getPtr() < X.getPtr(); } };