summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-06 22:28:05 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-06 22:28:05 +0000
commitc6da7f1c746257a1112004fc67c36b0e64cafa90 (patch)
tree7a57aea20771b604f8ae9156260eb7c15b2bf14b /llvm/lib
parent61a093300754475909ab376bf01f9dd2fd91b2be (diff)
downloadbcm5719-llvm-c6da7f1c746257a1112004fc67c36b0e64cafa90.tar.gz
bcm5719-llvm-c6da7f1c746257a1112004fc67c36b0e64cafa90.zip
AsmWriter: Extract writeTag(), NFC
llvm-svn: 228447
Diffstat (limited to 'llvm/lib')
-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