[PATCH] D96285: [clang][Arm] Fix handling of -Wa,-implicit-it=
David Spickett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 02:58:51 PST 2021
DavidSpickett added inline comments.
================
Comment at: clang/test/Driver/arm-target-as-mimplicit-it.s:26
+/// assembler flag appearing last (latter wins).
+// RUN: %clang -target arm-linux-gnueabi -### -mimplicit-it=never -Wa,-mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=NEVER_ALWAYS
+// RUN: %clang -target arm-linux-gnueabi -### -mimplicit-it=always -Wa,-mimplicit-it=never %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS_NEVER
----------------
I'm confused why this generates two `-arm-implicit-it`.
I'd expect that:
A c file only uses the compiler's argument
An assembler file uses the compiler and assembler argument, with the assembler argument last
Are we calling CollectArgsForIntegratedAssembler even for a C file?
================
Comment at: clang/test/Driver/arm-target-as-mimplicit-it.s:43
+// XINVALID: error: unsupported argument '-mimplicit-it=foo' to option 'Xassembler'
+// ALWAYS_NEVER: "-mllvm" "-arm-implicit-it=always" "-mllvm" "-arm-implicit-it=never"
+// NEVER_ALWAYS: "-mllvm" "-arm-implicit-it=never" "-mllvm" "-arm-implicit-it=always"
----------------
I'd put these last two before the unsupported argument lines, to match the test order.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96285/new/
https://reviews.llvm.org/D96285
More information about the cfe-commits
mailing list