[PATCH] D36366: [COFF, ARM64] Use '//' as comment character in assembly files in GNU environments

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 08:14:37 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp:72
     MAI = new AArch64MCAsmInfoDarwin();
+  else if (TheTriple.isOSBinFormatCOFF() && TheTriple.isGNUEnvironment())
+    MAI = new AArch64MCAsmInfoCOFFGNU();
----------------
martell wrote:
> Can we make this consistent with the other Targets?
> In `ARMMCTargetDesc.cpp` we have
> ```
>   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.
> It also seems we should have
> AArch64COFFMCAsmInfo and not AArch64MCAsmInfoCOFF but that is outside the scope of this patch
> 
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?


https://reviews.llvm.org/D36366





More information about the llvm-commits mailing list