]> granicus.if.org Git - clang/commitdiff
Removed ability to create symbol bindings
authorTed Kremenek <kremenek@apple.com>
Fri, 8 Feb 2008 19:08:13 +0000 (19:08 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 8 Feb 2008 19:08:13 +0000 (19:08 +0000)
in VarKey and VariableBindingsTy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46887 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRConstants.cpp
Analysis/ValueState.h

index 66a320b16d3d2c3542d78250b464a64ebb143489..75edb911e637174c30a3b46f1680ece48ace8b3d 100644 (file)
@@ -520,8 +520,7 @@ GRConstants::StateTy GRConstants::RemoveDeadBindings(Stmt* Loc, StateTy M) {
 
   llvm::SmallVector<ValueDecl*, 10> 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()) {
index 388231090e7902d2fd061afc59d106bcc329550b..4de4f2e3f9c55230f6064629c7e6e430d73ed956 100644 (file)
@@ -55,15 +55,9 @@ public:
   }
   
   inline void* getPtr() const { 
-    assert (getKind() != IsSymbol);
     return reinterpret_cast<void*>(Raw & ~Mask);
   }
   
-  inline SymbolID getSymbolID() const {
-    assert (getKind() == IsSymbol);
-    return Raw >> 2;
-  }
-  
   VarBindKey(const ValueDecl* VD)
   : Raw(reinterpret_cast<uintptr_t>(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();
   }
 };