Remove a newline from `AssemblyWriter::printMDNodeBody()`, and add one
to `AssemblyWriter::writeMDNode()`. NFCI for assembly output.
However, this drops an inconsistent newline from `Metadata::print()`
when `this` is an `MDNode`. Now the newline added by `Metadata::dump()`
won't look so verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230565
91177308-0d34-0410-b5e6-
96231b3b80d8
void AssemblyWriter::writeMDNode(unsigned Slot, const MDNode *Node) {
Out << '!' << Slot << " = ";
printMDNodeBody(Node);
+ Out << "\n";
}
void AssemblyWriter::writeAllMDNodes() {
void AssemblyWriter::printMDNodeBody(const MDNode *Node) {
WriteMDNodeBodyInternal(Out, Node, &TypePrinter, &Machine, TheModule);
WriteMDNodeComment(Node, Out);
- Out << "\n";
}
void AssemblyWriter::writeAllAttributeGroups() {
MDNode *Nodes[] = {N0, N1, N2};
for (auto *Node : Nodes)
OS << ", <" << (void *)Node << ">";
- OS << "}\n";
+ OS << "}";
}
std::string Actual;