This is a simple refactor. In some cases, we need to check if a MCStreamer pointer is MCAsmStreamer or MCObjectStreamer, so we can implement some different behaviour in assembly mode and object mode.
For example, we are going to support dwarf for XCOFF. XCOFF assembler will fill the .debug_line or .debug_info length into the final object file, so in assembly mode, compiler should not emit .debug_line or .debug_info length into the section header, but in object mode, we still need that length to make other tools happy.
clang-tidy: warning: invalid case style for function 'EmitRegisterName' [readability-identifier-naming]
not useful