Open llvmbot opened 6 years ago
FWIW, in clang 9.0.0, this no longer hits an unreachable. Now we have:
$ clang-cl -c x.cpp && echo works fine works fine
$ clang-cl -flto=thin -c x.cpp error: unknown token in expression mov $0, %ecx
presumably due to a misunderstanding about Intel versus AT&T syntax.
If I add an explicit ".att_syntax\n\t" to the repro, then it works.
https://reviews.llvm.org/D82862 made AT&T syntax in module-level inline asm work, at the cost of non-working Intel syntax in module-level inline asm (clang -c -flto -masm=intel a.c
). The priority is probably low, as most people use AT&T syntax and Intel syntax support has been weak in LLVM.
Furthermore, module-level inline asm statements are concatenated. Using one global setting likely doesn't work with mixed Intel and AT&T syntax. I think fixing this property, which likely requires inteldialect
in module asm
, has even lower priority.
@zmodem @uweigand @nico
Extended Description
clang version 6.0.0 (trunk 318877) Target: i686-pc-windows-msvc
Reduced from xptcstubs.cpp in the Mozilla tree:
It hits: void MCStreamer::BeginCOFFSymbolDef(const MCSymbol *Symbol) { llvm_unreachable("this directive only supported on COFF targets"); }
Presumably because it's an MCStreamer and not a MCWinCOFFStreamer?