[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:
Nico Weber 2018-01-17 13:34:20 +00:00
parent 65ed364fac
commit e3712cf5c4
2 changed files with 5 additions and 0 deletions

View File

@ -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.

View File

@ -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;
}