r322652 - [clang-cl] Let /FA output use intel assembly.
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 17 05:34:20 PST 2018
Author: nico
Date: Wed Jan 17 05:34:20 2018
New Revision: 322652
URL: http://llvm.org/viewvc/llvm-project?rev=322652&view=rev
Log:
[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
Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/masm.c
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=322652&r1=322651&r2=322652&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Wed Jan 17 05:34:20 2018
@@ -1761,6 +1761,9 @@ void Clang::AddX86TargetArgs(const ArgLi
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.
Modified: cfe/trunk/test/Driver/masm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/masm.c?rev=322652&r1=322651&r2=322652&view=diff
==============================================================================
--- cfe/trunk/test/Driver/masm.c (original)
+++ cfe/trunk/test/Driver/masm.c Wed Jan 17 05:34:20 2018
@@ -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;
}
More information about the cfe-commits
mailing list