From 7b4272f6592d6ee114b8049c5303575f679eecca Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 9 Nov 2015 23:59:29 +0000 Subject: [PATCH] MachineVerifier: Add missing linebreak MachineInstr::print() with SkipOppers==true does not produce a linebreak, so we have to do that in MachineVerifier::report(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252551 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineVerifier.cpp | 1 + test/CodeGen/MIR/X86/machine-verifier.mir | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp index 3904a69b31a..c8c958846b8 100644 --- a/lib/CodeGen/MachineVerifier.cpp +++ b/lib/CodeGen/MachineVerifier.cpp @@ -425,6 +425,7 @@ void MachineVerifier::report(const char *msg, const MachineInstr *MI) { if (Indexes && Indexes->hasIndex(MI)) errs() << Indexes->getInstructionIndex(MI) << '\t'; MI->print(errs(), /*SkipOpers=*/true); + errs() << '\n'; } void MachineVerifier::report(const char *msg, diff --git a/test/CodeGen/MIR/X86/machine-verifier.mir b/test/CodeGen/MIR/X86/machine-verifier.mir index 2cde970d751..a7413d4d03b 100644 --- a/test/CodeGen/MIR/X86/machine-verifier.mir +++ b/test/CodeGen/MIR/X86/machine-verifier.mir @@ -15,7 +15,8 @@ body: | bb.0.entry: liveins: %edi ; CHECK: *** Bad machine code: Too few operands *** - ; CHECK: instruction: COPY2 operands expected, but 0 given. + ; CHECK: instruction: COPY + ; CHECK: 2 operands expected, but 0 given. COPY RETQ ... -- 2.34.1