DebugInfo: Remove dead code, DICompositeType::addMember(DIDescriptor D)

It's no longer necessary to lazily add members to the DICompositeType
member list. Instead any lazy members (special member functions and
member template instantiations) are added to the parent late based on
their context link, the same way that nested types have always been
handled (never being in the member list - just added to the parent DIE
lazily based on context).

Clang's been updated not to use this function anymore as it improves
type unit consistency by never emitting lazy members in type units.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198079 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2013-12-27 19:11:52 +00:00
parent 1739b6cc20
commit bd75475bfc
2 changed files with 0 additions and 14 deletions

View File

@ -385,7 +385,6 @@ public:
DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
void setTypeArray(DIArray Elements, DIArray TParams = DIArray());
void addMember(DIDescriptor D);
unsigned getRunTimeLang() const { return getUnsignedField(11); }
DITypeRef getContainingType() const { return getFieldAs<DITypeRef>(12); }
void setContainingType(DICompositeType ContainingType);

View File

@ -666,19 +666,6 @@ void DICompositeType::setTypeArray(DIArray Elements, DIArray TParams) {
DbgNode = N;
}
void DICompositeType::addMember(DIDescriptor D) {
SmallVector<llvm::Value *, 16> M;
DIArray OrigM = getTypeArray();
unsigned Elements = OrigM.getNumElements();
if (Elements == 1 && !OrigM.getElement(0))
Elements = 0;
M.reserve(Elements + 1);
for (unsigned i = 0; i != Elements; ++i)
M.push_back(OrigM.getElement(i));
M.push_back(D);
setTypeArray(DIArray(MDNode::get(DbgNode->getContext(), M)));
}
/// Generate a reference to this DIType. Uses the type identifier instead
/// of the actual MDNode if possible, to help type uniquing.
DIScopeRef DIScope::getRef() const {