[PATCH] D42497: clang-cl: Simplify handling of /arch: flag.
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 24 12:14:32 PST 2018
thakis created this revision.
thakis added a reviewer: rnk.
Herald added subscribers: fedor.sergeev, kristof.beyls, sdardis, emaste, aemerson.
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` we need to pipe a Driver to getX86TargetCPU() which makes the patch look larger than it is. The interesting bit is the change to X86.cpp, and to the test.
No intended behavior change.
This is in preparation for adding support for /arch:AVX512(F).
https://reviews.llvm.org/D42497
Files:
lib/Driver/ToolChains/Arch/Mips.cpp
lib/Driver/ToolChains/Arch/Mips.h
lib/Driver/ToolChains/Arch/X86.cpp
lib/Driver/ToolChains/Arch/X86.h
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/CommonArgs.cpp
lib/Driver/ToolChains/CommonArgs.h
lib/Driver/ToolChains/FreeBSD.cpp
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Linux.cpp
lib/Driver/ToolChains/NetBSD.cpp
lib/Driver/ToolChains/OpenBSD.cpp
test/Driver/cl-x86-flags.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42497.131324.patch
Type: text/x-patch
Size: 20980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180124/e4d46cb9/attachment-0001.bin>
More information about the cfe-commits
mailing list