The reason we need to search by name rather than by Triple::ArchType
is to handle x86_64h correclty. There is no different ArchType
for the x86_64h architecture (it identifies itself as x86_64), and
this is by design. The only way to get to the x86_64h slice of an
universal binary is to serch by name.
This issue led to hard to debug and transient symbolication failures
in Asan tests (it mostly works, because the files are very similar).
This also affects the Profiling infrastucture as it is the other user
of that API.