This allows using semicolons for bundling up more than one statement per line. This is used within the mingw-w64 project in some assembly files that contain code for multiple architectures.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
An example of where this is used is e.g. https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/stdio/scanf2-template.S (with aarch64 support is added in a patch at https://sourceforge.net/p/mingw-w64/mailman/message/35983275/).
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 ↗ | (On Diff #109913) | Can we make this consistent with the other Targets? else if (TheTriple.isWindowsMSVCEnvironment()) MAI = new ARMCOFFMCAsmInfoMicrosoft(); else if (TheTriple.isOSWindows()) MAI = new ARMCOFFMCAsmInfoGNU(); So flip this so it checks if MSVCEnvironment first and if not and still windows do the GNU style. |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 ↗ | (On Diff #109913) | Sure. Then I'll update the existing test in test/MC/AArch64/coff-relocations.s from aarch64-windows to aarch64-windows-msvc, since that test uses ; for comments. Then it might also make sense to add a AArch64COFFMCAsmInfoMicrosoft frontend classs if msvc is the exception, not the default case, right? |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 ↗ | (On Diff #109913) | I never clarified why... cygwin, midipix etc. :) else if (TheTriple.isWindowsMSVCEnvironment()) MAI = new AArch64MCAsmInfoCOFF(); else if (TheTriple.isOSWindows()) MAI = new AArch64MCAsmInfoCOFFGNU(); should suffice, though AArch64MCAsmInfoCOFF should be AArch64COFFMCAsmInfoMicrosoft |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 ↗ | (On Diff #109913) | I wrote that before seeing your reply. |
Made the GNU case the default. Apparently I didn't have to update the existing test either, because aarch64-windows still triggers isWindowsMSVCEnvironment (but not isKnownWindowsMSVCEnvironment).