diff --git a/tools/llvm-lipo/llvm-lipo.cpp b/tools/llvm-lipo/llvm-lipo.cpp index e746db41405..ba413b10fb0 100644 --- a/tools/llvm-lipo/llvm-lipo.cpp +++ b/tools/llvm-lipo/llvm-lipo.cpp @@ -441,10 +441,10 @@ readInputBinaries(ArrayRef InputFiles) { if (IF.ArchType && (B->isMachO() || B->isArchive())) { const auto S = B->isMachO() ? Slice(cast(B)) : Slice(cast(B)); - const auto SpecifiedCPUType = - MachO::getCPUTypeFromArchitecture( - MachO::mapToArchitecture(Triple(*IF.ArchType))) - .first; + const auto SpecifiedCPUType = MachO::getCPUTypeFromArchitecture( + MachO::getArchitectureFromName( + Triple(*IF.ArchType).getArchName())) + .first; // For compatibility with cctools' lipo the comparison is relaxed just to // checking cputypes. if (S.getCPUType() != SpecifiedCPUType) @@ -583,7 +583,7 @@ static void extractSlice(ArrayRef> InputBinaries, exit(EXIT_SUCCESS); } -static void checkArchDuplicates(const ArrayRef &Slices) { +static void checkArchDuplicates(ArrayRef Slices) { DenseMap CPUIds; for (const auto &S : Slices) { auto Entry = CPUIds.try_emplace(S.getCPUID(), S.getBinary());