From 86b032b2abcf8a66282241937861156fc432fa33 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 3 Jul 2012 20:01:02 +0000 Subject: [PATCH] Use the DebugInfo's 'print()' method to emit the comments. These give quite a bit more information about the DebugInfo and makes it more readable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159680 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 99e2687bbe2..669d308b1a1 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -2043,10 +2043,12 @@ static void WriteMDNodeComment(const MDNode *Node, unsigned Tag = Desc.getTag(); Out.PadToColumn(50); - if (Tag == dwarf::DW_TAG_user_base) + if (dwarf::TagString(Tag)) { + Out << "; "; + Desc.print(Out); + } else if (Tag == dwarf::DW_TAG_user_base) { Out << "; [ DW_TAG_user_base ]"; - else if (const char *TagName = dwarf::TagString(Tag)) - Out << "; [ " << TagName << " ]"; + } } void AssemblyWriter::writeAllMDNodes() {