From ecf132debcda6b718093d52da6cde2f5e5a7c63a Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 3 Feb 2022 19:05:18 +0000 Subject: [llvm-libtool-darwin] Remove var to fix use This seems to have been moved so the second use is invalid on Linux but not macOS --- llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp') diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp index a5c664c..8b6b264 100644 --- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp +++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp @@ -360,9 +360,8 @@ private: auto *O = dyn_cast(ObjOrErr->get()); uint32_t FileCPUType, FileCPUSubtype; - StringRef ArchName = O->getArchTriple().getArchName(); std::tie(FileCPUType, FileCPUSubtype) = MachO::getCPUTypeFromArchitecture( - MachO::getArchitectureFromName(ArchName)); + MachO::getArchitectureFromName(O->getArchTriple().getArchName())); // If -arch_only is specified then skip this file if it doesn't match // the architecture specified. @@ -373,7 +372,7 @@ private: if (!NoWarningForNoSymbols && O->symbols().empty()) WithColor::warning() << "'" + Member.MemberName + "': has no symbols for architecture " + - ArchName + "\n"; + O->getArchTriple().getArchName() + "\n"; uint64_t FileCPUID = getCPUID(FileCPUType, FileCPUSubtype); Builder.Data.MembersPerArchitecture[FileCPUID].push_back( -- cgit v1.1