[Driver] Clang driver treats `.s` file extension as `-x assembler-with-cpp` instead of `-x assembler`
According to https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Types.def#L78 and https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Overall-Options.html, it seems .s should be treated as -x assembler, but it seems the driver treats .s as -x assembler-with-cpp.
Steps to reproduce:
touch empty.s
clang -### empty.s
The output contains "-x" "assembler-with-cpp".
@llvm/issue-subscribers-clang-driver
Author: Yeoul Na (rapidsna)
Steps to reproduce:
touch empty.s
clang -### empty.s
The output contains "-x" "assembler-with-cpp".
% clang '-###' a.s |& grep -o assembler-with-cpp # no output
% clang '-###' a.S |& grep -o assembler-with-cpp
assembler-with-cpp
Interesting. I'm on an arm64 Mac and does see this output.
% clang '-###' a.s 2>&1 | grep -o assembler-with-cpp assembler-with-cpp
I tested with main: a0eb6b88f9af9ea51bf5cadcb4c223f3d235ed57