MIPS .debug_* sections should have SHT_MIPS_DWARF section type to distinguish among sections contain DWARF and ECOFF debug formats, but in assembly files these sections have SHT_PROGBITS (@progbits) type. Now assembler shows 'changed section type for ...' error when parsing .section .debug_*,"",@progbits directive for MIPS targets.
The same problem exists for x86-64 target and this patch extends workaround implemented in D76151. The patch adds one more case when assembler ignore section types mismatch after SwitchSection() call.
Should this be restricted to Section->getName().startsWith (".debug")?