https://github.com/sga-sc updated https://github.com/llvm/llvm-project/pull/184355
>From 3ec4b53d905733b9ce704ed39b419e9db4366b18 Mon Sep 17 00:00:00 2001 From: Georgiy Samoylov <[email protected]> Date: Tue, 3 Mar 2026 18:03:16 +0300 Subject: [PATCH] [lldb] Delete last comma from features --- .../Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp index 6384b5e1bb57c..36329e40ab8a2 100644 --- a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp @@ -1617,6 +1617,10 @@ DisassemblerLLVMC::DisassemblerLLVMC(const ArchSpec &arch, } } + // We should delete the last comma from string + if (!features_str.empty() && features_str.back() == ',') + features_str.pop_back(); + // We use m_disasm_up.get() to tell whether we are valid or not, so if this // isn't good for some reason, we won't be valid and FindPlugin will fail and // we won't get used. @@ -1638,9 +1642,9 @@ DisassemblerLLVMC::DisassemblerLLVMC(const ArchSpec &arch, /* Create alternate disassembler for MIPS16 and microMIPS */ uint32_t arch_flags = arch.GetFlags(); if (arch_flags & ArchSpec::eMIPSAse_mips16) - features_str += "+mips16,"; + features_str += ",+mips16"; else if (arch_flags & ArchSpec::eMIPSAse_micromips) - features_str += "+micromips,"; + features_str += ",+micromips"; m_alternate_disasm_up = MCDisasmInstance::Create( triple_str, cpu, features_str.c_str(), flavor, *this); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
