Skip to content

Commit ecf132d

Browse files
committed
[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
1 parent 9ac874f commit ecf132d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,8 @@ class MembersBuilder {
360360

361361
auto *O = dyn_cast<MachOObjectFile>(ObjOrErr->get());
362362
uint32_t FileCPUType, FileCPUSubtype;
363-
StringRef ArchName = O->getArchTriple().getArchName();
364363
std::tie(FileCPUType, FileCPUSubtype) = MachO::getCPUTypeFromArchitecture(
365-
MachO::getArchitectureFromName(ArchName));
364+
MachO::getArchitectureFromName(O->getArchTriple().getArchName()));
366365

367366
// If -arch_only is specified then skip this file if it doesn't match
368367
// the architecture specified.
@@ -373,7 +372,7 @@ class MembersBuilder {
373372
if (!NoWarningForNoSymbols && O->symbols().empty())
374373
WithColor::warning() << "'" + Member.MemberName +
375374
"': has no symbols for architecture " +
376-
ArchName + "\n";
375+
O->getArchTriple().getArchName() + "\n";
377376

378377
uint64_t FileCPUID = getCPUID(FileCPUType, FileCPUSubtype);
379378
Builder.Data.MembersPerArchitecture[FileCPUID].push_back(

0 commit comments

Comments
 (0)