Conjured symbols now bind to Stmt* instead of Expr*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-11-12 19:22:47 +00:00
Родитель a441b7e913
Коммит b5abb429e7
2 изменённых файлов: 10 добавлений и 11 удалений

Просмотреть файл

@ -166,30 +166,29 @@ public:
};
class SymbolConjured : public SymbolData {
Expr* E;
Stmt* S;
QualType T;
unsigned Count;
public:
SymbolConjured(SymbolID Sym, Expr* exp, QualType t, unsigned count)
: SymbolData(ConjuredKind, Sym), E(exp), T(t), Count(count) {}
Expr* getExpr() const { return E; }
unsigned getCount() const { return Count; }
SymbolConjured(SymbolID Sym, Stmt* s, QualType t, unsigned count)
: SymbolData(ConjuredKind, Sym), S(s), T(t), Count(count) {}
Stmt* getStmt() const { return S; }
unsigned getCount() const { return Count; }
QualType getType() const { return T; }
static void Profile(llvm::FoldingSetNodeID& profile,
Expr* E, QualType T, unsigned Count) {
Stmt* S, QualType T, unsigned Count) {
profile.AddInteger((unsigned) ConjuredKind);
profile.AddPointer(E);
profile.AddPointer(S);
profile.Add(T);
profile.AddInteger(Count);
}
virtual void Profile(llvm::FoldingSetNodeID& profile) {
Profile(profile, E, T, Count);
Profile(profile, S, T, Count);
}
// Implement isa<T> support.
@ -247,7 +246,7 @@ public:
SymbolID getSymbol(VarDecl* D);
SymbolID getContentsOfSymbol(SymbolID sym);
SymbolID getConjuredSymbol(Expr* E, QualType T, unsigned VisitCount);
SymbolID getConjuredSymbol(Stmt* E, QualType T, unsigned VisitCount);
SymbolID getConjuredSymbol(Expr* E, unsigned VisitCount) {
return getConjuredSymbol(E, E->getType(), VisitCount);
}

Просмотреть файл

@ -73,7 +73,7 @@ SymbolID SymbolManager::getContentsOfSymbol(SymbolID sym) {
return SymbolCounter++;
}
SymbolID SymbolManager::getConjuredSymbol(Expr* E, QualType T, unsigned Count) {
SymbolID SymbolManager::getConjuredSymbol(Stmt* E, QualType T, unsigned Count) {
llvm::FoldingSetNodeID profile;
SymbolConjured::Profile(profile, E, T, Count);