summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 8b7ed55fe71..43ae3feb363 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1297,16 +1297,20 @@ static void writeMetadataAsOperand(raw_ostream &Out, const Metadata *MD,
WriteAsOperandInternal(Out, MD, TypePrinter, Machine, Context);
}
-static void writeGenericDebugNode(raw_ostream &Out, const GenericDebugNode *N,
- TypePrinting *TypePrinter,
- SlotTracker *Machine, const Module *Context) {
- Out << "!GenericDebugNode(";
- FieldSeparator FS;
+static void writeTag(raw_ostream &Out, FieldSeparator &FS, const DebugNode *N) {
Out << FS << "tag: ";
if (const char *Tag = dwarf::TagString(N->getTag()))
Out << Tag;
else
Out << N->getTag();
+}
+
+static void writeGenericDebugNode(raw_ostream &Out, const GenericDebugNode *N,
+ TypePrinting *TypePrinter,
+ SlotTracker *Machine, const Module *Context) {
+ Out << "!GenericDebugNode(";
+ FieldSeparator FS;
+ writeTag(Out, FS, N);
if (!N->getHeader().empty()) {
Out << FS << "header: \"";
PrintEscapedString(N->getHeader(), Out);
OpenPOWER on IntegriCloud