]> granicus.if.org Git - clang/commit
clang-cl: Simplify handling of /arch: flag.
authorNico Weber <nicolasweber@gmx.de>
Thu, 25 Jan 2018 14:38:29 +0000 (14:38 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 25 Jan 2018 14:38:29 +0000 (14:38 +0000)
commit96b4d114c73144574569f74e1e04e14f64513026
tree94a1101de9a159161dff582a902b40d47f2ce69d
parent9660f4bc0062e8c71f2b8310b6ed0520177ee317
clang-cl: Simplify handling of /arch: flag.

r213083 initially implemented /arch: support by mapping it to CPU features.
Then r241077 additionally mapped it to CPU, which made the feature flags
redundant (if harmless). This change here removes the redundant mapping to
feature flags, and rewrites test/Driver/cl-x86-flags.c to be a bit more of an
integration test that checks for preprocessor defines like AVX (like documented
on MSDN) instead of for driver flags.

To keep emitting warn_drv_unused_argument, use getLastArgNoClaim() followed by an explicit claim() if needed.

This is in preparation for adding support for /arch:AVX512(F).

No intended behavior change.

https://reviews.llvm.org/D42497

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323426 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Arch/X86.cpp
test/Driver/cl-x86-flags.c