MachineVerifier: Add missing linebreak
authorMatthias Braun <matze@braunis.de>
Mon, 9 Nov 2015 23:59:29 +0000 (23:59 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 9 Nov 2015 23:59:29 +0000 (23:59 +0000)
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
test/CodeGen/MIR/X86/machine-verifier.mir

index 3904a69b31abea8d3bc31628a66f3aff7d4a71e7..c8c958846b878606404547aeeda945e75ea09e22 100644 (file)
@@ -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,
index 2cde970d7516ee00fddd93d7687b98864487afa2..a7413d4d03bc27f01d3295b4d62813a2bca301df 100644 (file)
@@ -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
 ...