diff options
author | Fangrui Song <i@maskray.me> | 2024-03-15 09:38:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 09:38:07 -0700 |
commit | f4335f075b3496bce6b49f9267e6160d1824b1bb (patch) | |
tree | 729b8fdfaea943b4cad87ff0f60c0c0a6390d0ef /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f01a32f5c58b199edf7cd1492a20578453852f0e (diff) | |
download | llvm-f4335f075b3496bce6b49f9267e6160d1824b1bb.zip llvm-f4335f075b3496bce6b49f9267e6160d1824b1bb.tar.gz llvm-f4335f075b3496bce6b49f9267e6160d1824b1bb.tar.bz2 |
[X86,AsmPrinter] Set assembler dialect for module inline asm
`clang -c -masm=intel` compiling a source file with file scope basic asm
incorrectly uses the AT&T dialect.
```
% cat a.c
asm("mov rax, rax");
% clang a.c -c -masm=intel
<inline asm>:1:1: error: unknown use of instruction mnemonic without a size suffix
mov rax, rax
^
```
Fix this by setting the assembler dialect from the MCAsmInfo object.
Note: `clang -c -flto -masm=intel a.c` still fails because of
https://reviews.llvm.org/D82862 for #34830: it tried to support AT&T
syntax for clang-cl, but the forced AT&T syntax is not compatible with
intended Intel syntax.
Pull Request: https://github.com/llvm/llvm-project/pull/85367
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions