[ARM][TargetParser] Improve handling of dependencies between target features
authorMomchil Velikov <momchil.velikov@arm.com>
Wed, 5 Feb 2020 15:19:03 +0000 (15:19 +0000)
committerMomchil Velikov <momchil.velikov@arm.com>
Wed, 5 Feb 2020 16:07:51 +0000 (16:07 +0000)
commit3627c91ead934486fdb3986b911482a78f101309
treea4efcb61676e5cbba4ffb85b9216b4c0df478476
parent91b3083aecdcb7beb33d497a94f4467f110b4f6d
[ARM][TargetParser] Improve handling of dependencies between target features

The patch at https://reviews.llvm.org/D64048 added "negative"
dependency handling in `ARM::appendArchExtFeatures`: feature "noX"
removes all features, which imply "X".

This patch adds the "positive" handling: feature "X" adds all the
feature strings implied by "X".

(This patch also comes from the suggestion here
https://reviews.llvm.org/D72633#inline-658582)

Differential Revision: https://reviews.llvm.org/D72762
clang/lib/Basic/Targets/ARM.cpp
clang/test/Driver/arm-mfpu.c
clang/test/Preprocessor/arm-target-features.c
llvm/lib/Support/ARMTargetParser.cpp
llvm/unittests/Support/TargetParserTest.cpp