We may need to do some customization for DWARF unit length in DWARF section headers for some code generation path.
For example in D95518, for XCOFF in assembly path, AIX assembler does not require the debug section containing its debug unit length in the header.
Thanks to @ikudrin comments, moving the emitDwarfUnitLength to class MCStreamer can make us avoid the streamer type check in general code.
This is the NFC part to make D95518 easy to review.
Override of emitDwarfUnitLength in MCAsmStreamer class will be added in D95518.
This test file is for methods of AsmPrinter; other classes should be tested elsewhere. As the patch removes AsmPrinter::maybeEmitDwarf64Mark(), the corresponding tests can also be removed. That will not degrade the test coverage because MCStreamer::maybeEmitDwarf64Mark() is tested, although indirectly, in other tests.