mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
DebugInfo: Gut DIType and subclasses
Continuing PR23080, gut `DIType` and its various subclasses, leaving behind thin wrappers around the pointer types in the new debug info hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -98,27 +98,27 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
|
||||
O << '\n';
|
||||
}
|
||||
|
||||
for (DIType T : Finder.types()) {
|
||||
for (const MDType *T : Finder.types()) {
|
||||
O << "Type:";
|
||||
if (!T.getName().empty())
|
||||
O << ' ' << T.getName();
|
||||
printFile(O, T.getFilename(), T.getDirectory(), T.getLineNumber());
|
||||
if (DIBasicType BT = dyn_cast<MDBasicType>(T)) {
|
||||
if (!T->getName().empty())
|
||||
O << ' ' << T->getName();
|
||||
printFile(O, T->getFilename(), T->getDirectory(), T->getLine());
|
||||
if (auto *BT = dyn_cast<MDBasicType>(T)) {
|
||||
O << " ";
|
||||
if (const char *Encoding =
|
||||
dwarf::AttributeEncodingString(BT.getEncoding()))
|
||||
dwarf::AttributeEncodingString(BT->getEncoding()))
|
||||
O << Encoding;
|
||||
else
|
||||
O << "unknown-encoding(" << BT.getEncoding() << ')';
|
||||
O << "unknown-encoding(" << BT->getEncoding() << ')';
|
||||
} else {
|
||||
O << ' ';
|
||||
if (const char *Tag = dwarf::TagString(T.getTag()))
|
||||
if (const char *Tag = dwarf::TagString(T->getTag()))
|
||||
O << Tag;
|
||||
else
|
||||
O << "unknown-tag(" << T.getTag() << ")";
|
||||
O << "unknown-tag(" << T->getTag() << ")";
|
||||
}
|
||||
if (DICompositeType CT = dyn_cast<MDCompositeType>(T)) {
|
||||
if (auto *S = CT.getIdentifier())
|
||||
if (auto *CT = dyn_cast<MDCompositeType>(T)) {
|
||||
if (auto *S = CT->getRawIdentifier())
|
||||
O << " (identifier: '" << S->getString() << "')";
|
||||
}
|
||||
O << '\n';
|
||||
|
Reference in New Issue
Block a user