forked from OSchip/llvm-project
Removed ability to create symbol bindings
in VarKey and VariableBindingsTy. llvm-svn: 46887
This commit is contained in:
parent
8c099c3f03
commit
5d9073c776
|
@ -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()) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue