[NFC] Improve triple match of scripts that update tests

Authored by dnsampaio on Jun 18 2019, 3:04 AM.


[NFC] Improve triple match of scripts that update tests

The prior behavior of the triple matcher would stop
in the first matched triple. It was not possible to
create specific matches for sub-sets of a triple
(e.g aarch64-apple-darwin would never be used after
aarch64 was matched).

This patch:

  1. Allows that specialized triples take priority,

considering that the string lenght of the triple
indentifies how specialized a triple is. If two
triples of same lenght match, the one matched first
prevails, preserving the old behavior.

  1. Remove 20 duplicated triples of arm, thumb,

aarch64 options with same arguments, matching
the common prefix (aarch64, arm, thumb) of them.

  1. Creates three new function matching regexes and

five triple options for arm64-apple-ios,
(arm|thumb)-apple-ios and thumb(v5)?-macho

Reviewers: lebedev.ri, RKSimon, MaskRay, gbedwell

Reviewed By: MaskRay

Subscribers: javed.absar, kristof.beyls, llvm-commits, carwil

Tags: #llvm

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

llvm-svn: 363656