[cfe-commits] r60572 - in /cfe/trunk: include/clang/Analysis/PathSensitive/SymbolManager.h lib/Analysis/SymbolManager.cpp
Ted Kremenek
kremenek at apple.com
Thu Dec 4 17:31:33 PST 2008
Author: kremenek
Date: Thu Dec 4 19:31:31 2008
New Revision: 60572
URL: http://llvm.org/viewvc/llvm-project?rev=60572&view=rev
Log:
Remove SymbolDataContentsOf (unused).
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h
cfe/trunk/lib/Analysis/SymbolManager.cpp
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h?rev=60572&r1=60571&r2=60572&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/SymbolManager.h Thu Dec 4 19:31:31 2008
@@ -70,7 +70,7 @@
class SymbolData : public llvm::FoldingSetNode {
public:
enum Kind { UndefKind, ParmKind, GlobalKind, ElementKind, FieldKind,
- ContentsOfKind, ConjuredKind };
+ ConjuredKind };
private:
Kind K;
@@ -188,30 +188,6 @@
}
};
-class SymbolDataContentsOf : public SymbolData {
- SymbolID Sym;
-
-public:
- SymbolDataContentsOf(SymbolID MySym, SymbolID sym) :
- SymbolData(ContentsOfKind, MySym), Sym(sym) {}
-
- SymbolID getContainerSymbol() const { return Sym; }
-
- static void Profile(llvm::FoldingSetNodeID& profile, SymbolID Sym) {
- profile.AddInteger((unsigned) ContentsOfKind);
- profile.AddInteger(Sym);
- }
-
- virtual void Profile(llvm::FoldingSetNodeID& profile) {
- Profile(profile, Sym);
- }
-
- // Implement isa<T> support.
- static inline bool classof(const SymbolData* D) {
- return D->getKind() == ContentsOfKind;
- }
-};
-
class SymbolConjured : public SymbolData {
Stmt* S;
QualType T;
@@ -294,7 +270,6 @@
SymbolID getSymbol(VarDecl* D);
SymbolID getElementSymbol(const MemRegion* R, const llvm::APSInt* Idx);
SymbolID getFieldSymbol(const MemRegion* R, const FieldDecl* D);
- SymbolID getContentsOfSymbol(SymbolID sym);
SymbolID getConjuredSymbol(Stmt* E, QualType T, unsigned VisitCount);
SymbolID getConjuredSymbol(Expr* E, unsigned VisitCount) {
return getConjuredSymbol(E, E->getType(), VisitCount);
Modified: cfe/trunk/lib/Analysis/SymbolManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SymbolManager.cpp?rev=60572&r1=60571&r2=60572&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/SymbolManager.cpp (original)
+++ cfe/trunk/lib/Analysis/SymbolManager.cpp Thu Dec 4 19:31:31 2008
@@ -86,28 +86,7 @@
DataMap[SymbolCounter] = SD;
return SymbolCounter++;
}
-
-SymbolID SymbolManager::getContentsOfSymbol(SymbolID sym) {
-
- llvm::FoldingSetNodeID profile;
- SymbolDataContentsOf::Profile(profile, sym);
- void* InsertPos;
-
- SymbolData* SD = DataSet.FindNodeOrInsertPos(profile, InsertPos);
-
- if (SD)
- return SD->getSymbol();
-
- SD = (SymbolData*) BPAlloc.Allocate<SymbolDataContentsOf>();
- new (SD) SymbolDataContentsOf(SymbolCounter, sym);
-
- DataSet.InsertNode(SD, InsertPos);
- DataMap[SymbolCounter] = SD;
-
- return SymbolCounter++;
-}
-
SymbolID SymbolManager::getConjuredSymbol(Stmt* E, QualType T, unsigned Count) {
llvm::FoldingSetNodeID profile;
@@ -145,13 +124,7 @@
case GlobalKind:
return cast<SymbolDataGlobalVar>(this)->getDecl()->getType();
-
- case ContentsOfKind: {
- SymbolID x = cast<SymbolDataContentsOf>(this)->getContainerSymbol();
- QualType T = SymMgr.getSymbolData(x).getType(SymMgr);
- return T->getAsPointerType()->getPointeeType();
- }
-
+
case ConjuredKind:
return cast<SymbolConjured>(this)->getType();
}
More information about the cfe-commits
mailing list