mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
AsmWriter: Extract writeMetadataAsOperand(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9f5367fed
commit
8b07f1bd5f
@ -1286,6 +1286,17 @@ raw_ostream &operator<<(raw_ostream &OS, FieldSeparator &FS) {
|
||||
}
|
||||
} // end namespace
|
||||
|
||||
static void writeMetadataAsOperand(raw_ostream &Out, const Metadata *MD,
|
||||
TypePrinting *TypePrinter,
|
||||
SlotTracker *Machine,
|
||||
const Module *Context) {
|
||||
if (!MD) {
|
||||
Out << "null";
|
||||
return;
|
||||
}
|
||||
WriteAsOperandInternal(Out, MD, TypePrinter, Machine, Context);
|
||||
}
|
||||
|
||||
static void writeGenericDebugNode(raw_ostream &Out, const GenericDebugNode *N,
|
||||
TypePrinting *TypePrinter,
|
||||
SlotTracker *Machine, const Module *Context) {
|
||||
@ -1306,11 +1317,7 @@ static void writeGenericDebugNode(raw_ostream &Out, const GenericDebugNode *N,
|
||||
FieldSeparator IFS;
|
||||
for (auto &I : N->dwarf_operands()) {
|
||||
Out << IFS;
|
||||
if (!I) {
|
||||
Out << "null";
|
||||
continue;
|
||||
}
|
||||
WriteAsOperandInternal(Out, I, TypePrinter, Machine, Context);
|
||||
writeMetadataAsOperand(Out, I, TypePrinter, Machine, Context);
|
||||
}
|
||||
Out << "}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user