[llvm] r228447 - AsmWriter: Extract writeTag(), NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Feb 6 14:28:06 PST 2015
Author: dexonsmith
Date: Fri Feb 6 16:28:05 2015
New Revision: 228447
URL: http://llvm.org/viewvc/llvm-project?rev=228447&view=rev
Log:
AsmWriter: Extract writeTag(), NFC
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=228447&r1=228446&r2=228447&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Fri Feb 6 16:28:05 2015
@@ -1297,16 +1297,20 @@ static void writeMetadataAsOperand(raw_o
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);
More information about the llvm-commits
mailing list