DebugInfo: Gut DICompileUnit and DIFile

Continuing gutting `DIDescriptor` subclasses; this edition,
`DICompileUnit` and `DIFile`.  In the name of PR23080.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-15 23:19:27 +00:00
parent 65f76b4036
commit ed0e117ff3
13 changed files with 69 additions and 98 deletions

View File

@@ -72,13 +72,13 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
// Printing the nodes directly isn't particularly helpful (since they
// reference other nodes that won't be printed, particularly for the
// filenames), so just print a few useful things.
for (DICompileUnit CU : Finder.compile_units()) {
for (MDCompileUnit *CU : Finder.compile_units()) {
O << "Compile unit: ";
if (const char *Lang = LanguageString(CU.getLanguage()))
if (const char *Lang = dwarf::LanguageString(CU->getSourceLanguage()))
O << Lang;
else
O << "unknown-language(" << CU.getLanguage() << ")";
printFile(O, CU.getFilename(), CU.getDirectory());
O << "unknown-language(" << CU->getSourceLanguage() << ")";
printFile(O, CU->getFilename(), CU->getDirectory());
O << '\n';
}