mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
IR: Drop newline from AssemblyWriter::printMDNodeBody()
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
This commit is contained in:
parent
8e3ef7f186
commit
344ea29148
@ -3000,6 +3000,7 @@ static void WriteMDNodeComment(const MDNode *Node,
|
||||
void AssemblyWriter::writeMDNode(unsigned Slot, const MDNode *Node) {
|
||||
Out << '!' << Slot << " = ";
|
||||
printMDNodeBody(Node);
|
||||
Out << "\n";
|
||||
}
|
||||
|
||||
void AssemblyWriter::writeAllMDNodes() {
|
||||
@ -3017,7 +3018,6 @@ void AssemblyWriter::writeAllMDNodes() {
|
||||
void AssemblyWriter::printMDNodeBody(const MDNode *Node) {
|
||||
WriteMDNodeBodyInternal(Out, Node, &TypePrinter, &Machine, TheModule);
|
||||
WriteMDNodeComment(Node, Out);
|
||||
Out << "\n";
|
||||
}
|
||||
|
||||
void AssemblyWriter::writeAllAttributeGroups() {
|
||||
|
@ -228,7 +228,7 @@ TEST_F(MDNodeTest, Print) {
|
||||
MDNode *Nodes[] = {N0, N1, N2};
|
||||
for (auto *Node : Nodes)
|
||||
OS << ", <" << (void *)Node << ">";
|
||||
OS << "}\n";
|
||||
OS << "}";
|
||||
}
|
||||
|
||||
std::string Actual;
|
||||
|
Loading…
x
Reference in New Issue
Block a user