Revert "Re-commit "Use StringRef in Support/Darf APIs (NFC)""
One test seems randomly broken: DebugInfo/X86/gnu-public-names.ll llvm-svn: 283285
This commit is contained in:
@@ -74,8 +74,7 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
|
||||
// filenames), so just print a few useful things.
|
||||
for (DICompileUnit *CU : Finder.compile_units()) {
|
||||
O << "Compile unit: ";
|
||||
auto Lang = dwarf::LanguageString(CU->getSourceLanguage());
|
||||
if (!Lang.empty())
|
||||
if (const char *Lang = dwarf::LanguageString(CU->getSourceLanguage()))
|
||||
O << Lang;
|
||||
else
|
||||
O << "unknown-language(" << CU->getSourceLanguage() << ")";
|
||||
@@ -106,15 +105,14 @@ void ModuleDebugInfoPrinter::print(raw_ostream &O, const Module *M) const {
|
||||
printFile(O, T->getFilename(), T->getDirectory(), T->getLine());
|
||||
if (auto *BT = dyn_cast<DIBasicType>(T)) {
|
||||
O << " ";
|
||||
auto Encoding = dwarf::AttributeEncodingString(BT->getEncoding());
|
||||
if (!Encoding.empty())
|
||||
if (const char *Encoding =
|
||||
dwarf::AttributeEncodingString(BT->getEncoding()))
|
||||
O << Encoding;
|
||||
else
|
||||
O << "unknown-encoding(" << BT->getEncoding() << ')';
|
||||
} else {
|
||||
O << ' ';
|
||||
auto Tag = dwarf::TagString(T->getTag());
|
||||
if (!Tag.empty())
|
||||
if (const char *Tag = dwarf::TagString(T->getTag()))
|
||||
O << Tag;
|
||||
else
|
||||
O << "unknown-tag(" << T->getTag() << ")";
|
||||
|
||||
Reference in New Issue
Block a user