forked from OSchip/llvm-project
[clang-cl] Let /FA output use intel assembly.
cl's assembly output is in intel syntax, so clang-cl's should be too, PR35031. https://reviews.llvm.org/D42157 llvm-svn: 322652
This commit is contained in:
parent
65ed364fac
commit
e3712cf5c4
|
@ -1761,6 +1761,9 @@ void Clang::AddX86TargetArgs(const ArgList &Args,
|
|||
getToolChain().getDriver().Diag(diag::err_drv_unsupported_option_argument)
|
||||
<< A->getOption().getName() << Value;
|
||||
}
|
||||
} else if (getToolChain().getDriver().IsCLMode()) {
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-x86-asm-syntax=intel");
|
||||
}
|
||||
|
||||
// Set flags to support MCU ABI.
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
// RUN: %clang -target i386-unknown-linux -masm=att -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-ATT %s
|
||||
// RUN: %clang -target i386-unknown-linux -S -masm=somerequired %s -### 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s
|
||||
// RUN: %clang -target arm-unknown-eabi -S -masm=intel %s -### 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
|
||||
// RUN: %clang_cl /FA -### -- %s 2>&1 | FileCheck --check-prefix=CHECK-CL %s
|
||||
|
||||
int f() {
|
||||
// CHECK-INTEL: -x86-asm-syntax=intel
|
||||
// CHECK-ATT: -x86-asm-syntax=att
|
||||
// CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm='
|
||||
// CHECK-ARM: warning: argument unused during compilation: '-masm=intel'
|
||||
// CHECK-CL: -x86-asm-syntax=intel
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue