another symbolic value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47339
91177308-0d34-0410-b5e6-
96231b3b80d8
return X;
}
-QualType SymbolData::getType() const {
+QualType SymbolData::getType(const SymbolManager& SymMgr) const {
switch (getKind()) {
default:
assert (false && "getType() not implemented for this symbol.");
case ParmKind:
return cast<SymbolDataParmVar>(this)->getDecl()->getType();
+ case ContentsOfKind: {
+ SymbolID x = cast<SymbolDataContentsOf>(this)->getSymbol();
+ QualType T = SymMgr.getSymbolData(x).getType(SymMgr);
+ return T->getAsPointerType()->getPointeeType();
+ }
}
}
namespace clang {
+class SymbolManager;
+
class SymbolID {
unsigned Data;
public:
return K == R.K && Data == R.Data;
}
- QualType getType() const;
+ QualType getType(const SymbolManager& SymMgr) const;
// Implement isa<T> support.
static inline bool classof(const SymbolData*) { return true; }
}
inline QualType getType(SymbolID ID) const {
- return getSymbolData(ID).getType();
+ return getSymbolData(ID).getType(*this);
}
};