From 4d81aec40c62a0599a4bfbd7b45df78b302dbc3c Mon Sep 17 00:00:00 2001 From: Scott Linder Date: Wed, 24 Jun 2020 18:15:27 -0400 Subject: [MIR] Fix CFI_INSTRUCTION escape printing Summary: The printer seems to intend to not print the trailing comma but has a copy-paste error for the last value in the escape, and the parser enforces having no trailing comma, but somehow a test was never included to actually confirm it. Reviewers: thegameg, arsenm Reviewed By: thegameg, arsenm Subscribers: wdng, arsenm, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82478 --- llvm/lib/CodeGen/MachineOperand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineOperand.cpp') diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp index 912b306..2b4fd65 100644 --- a/llvm/lib/CodeGen/MachineOperand.cpp +++ b/llvm/lib/CodeGen/MachineOperand.cpp @@ -670,7 +670,7 @@ static void printCFI(raw_ostream &OS, const MCCFIInstruction &CFI, size_t e = CFI.getValues().size() - 1; for (size_t i = 0; i < e; ++i) OS << format("0x%02x", uint8_t(CFI.getValues()[i])) << ", "; - OS << format("0x%02x", uint8_t(CFI.getValues()[e])) << ", "; + OS << format("0x%02x", uint8_t(CFI.getValues()[e])); } break; } -- cgit v1.1