OSDN Git Service

[clang][Driver][ARM] Favor -mfpu over default CPU features
authorAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Sun, 14 Jul 2019 18:32:42 +0000 (18:32 +0000)
committerAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Sun, 14 Jul 2019 18:32:42 +0000 (18:32 +0000)
commit44a57d296910dae6d17888a1bf915e477ba2bdf8
tree5400b83f0207993e7a9ff1eb14fe87ac2e37b65b
parent0991535af088dc4726bf9d206d17a93cc1e798d3
[clang][Driver][ARM] Favor -mfpu over default CPU features

When processing the command line options march, mcpu and mfpu, we store
the implied target features on a vector. The change D62998 introduced a
temporary vector, where the processed features get accumulated. When
calling DecodeARMFeaturesFromCPU, which sets the default features for
the specified CPU, we certainly don't want to override the features
that have been explicitly specified on the command line. Therefore, the
default features should appear first in the final vector. This problem
became evident once I added the missing (unhandled) target features in
ARM::getExtensionFeatures.

Differential Revision: https://reviews.llvm.org/D63936

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366027 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ARMTargetParser.def
lib/Support/ARMTargetParser.cpp
unittests/Support/TargetParserTest.cpp