[Clang] Simplify unifying target features
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 14 Jun 2022 02:08:52 +0000 (22:08 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 14 Jun 2022 19:58:16 +0000 (15:58 -0400)
commitc4a2674e21c4f5ffd46f90982ce3c3d952018e66
treeb64f6605c7bd270aaa1262cff9e723f5943aad5f
parent10affe74eddb32bd36524e0e42310ef49aadaa3f
[Clang] Simplify unifying target features

This patch simplifies how we unify target features. Now we simply
iterate the input in reverse and only insert the feature if it hasn't
been seen yet. The only reason we need to reverse this at the end is to
keep the features in order for the existing tests.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D127707
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Driver/ToolChains/CommonArgs.h