[PATCH] D42497: clang-cl: Simplify handling of /arch: flag.
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 25 01:38:53 PST 2018
hans added a comment.
Thanks for looking into this!
================
Comment at: lib/Driver/ToolChains/Arch/X86.cpp:43
if (const Arg *A = Args.getLastArg(options::OPT__SLASH_arch)) {
+ // Mapping built by looking at lib/Basic's X86TargetInfo::initFeatureMap().
----------------
I wonder if it would work to do Args.getLastArgNoClaim() here instead, then do A->claim() if we actually use the argument, and let the general unused argument mechanism warn otherwise. Maybe that way we could avoid passing the Driver around.
================
Comment at: lib/Driver/ToolChains/Arch/X86.cpp:144
- // Set features according to the -arch flag on MSVC.
- if (Arg *A = Args.getLastArg(options::OPT__SLASH_arch)) {
----------------
Won't we need to set features for /arch:AVX512 though, or how will that work?
https://reviews.llvm.org/D42497
More information about the cfe-commits
mailing list