[cfe-commits] r46887 - in /cfe/trunk/Analysis: GRConstants.cpp ValueState.h

Ted Kremenek kremenek at apple.com
Fri Feb 8 11:08:13 PST 2008


Author: kremenek
Date: Fri Feb  8 13:08:13 2008
New Revision: 46887

URL: http://llvm.org/viewvc/llvm-project?rev=46887&view=rev
Log:
Removed ability to create symbol bindings
in VarKey and VariableBindingsTy.

Modified:
    cfe/trunk/Analysis/GRConstants.cpp
    cfe/trunk/Analysis/ValueState.h

Modified: cfe/trunk/Analysis/GRConstants.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRConstants.cpp?rev=46887&r1=46886&r2=46887&view=diff

==============================================================================
--- cfe/trunk/Analysis/GRConstants.cpp (original)
+++ cfe/trunk/Analysis/GRConstants.cpp Fri Feb  8 13:08:13 2008
@@ -520,8 +520,7 @@
 
   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()) {

Modified: cfe/trunk/Analysis/ValueState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.h?rev=46887&r1=46886&r2=46887&view=diff

==============================================================================
--- cfe/trunk/Analysis/ValueState.h (original)
+++ cfe/trunk/Analysis/ValueState.h Fri Feb  8 13:08:13 2008
@@ -55,15 +55,9 @@
   }
   
   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 @@
     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 @@
   }
   
   inline bool operator<(const VarBindKey& X) const { 
-    if (isSymbol())
-      return X.isSymbol() ? getSymbolID() < X.getSymbolID() : false;
-    
     return getPtr() < X.getPtr();
   }
 };





More information about the cfe-commits mailing list