[llvm-branch-commits] [llvm] 7b61485 - [llvm-ar] Remove unused parameter. NFC
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Aug 10 18:06:15 PDT 2022
Author: Fangrui Song
Date: 2022-08-10T18:03:47-07:00
New Revision: 7b61485d62294272f6432dbc63aa5cd99fe36c83
URL: https://github.com/llvm/llvm-project/commit/7b61485d62294272f6432dbc63aa5cd99fe36c83
DIFF: https://github.com/llvm/llvm-project/commit/7b61485d62294272f6432dbc63aa5cd99fe36c83.diff
LOG: [llvm-ar] Remove unused parameter. NFC
(cherry picked from commit 350f17ab52ec9df60095f7b7bccd49c429885ef7)
Added:
Modified:
llvm/tools/llvm-ar/llvm-ar.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 1d4a8e9cd398b..960c7a3d8713e 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -1125,8 +1125,7 @@ static void performOperation(ArchiveOperation Operation,
llvm_unreachable("Unknown operation.");
}
-static int performOperation(ArchiveOperation Operation,
- std::vector<NewArchiveMember> *NewMembers) {
+static int performOperation(ArchiveOperation Operation) {
// Create or open the archive object.
ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getFile(
ArchiveName, /*IsText=*/false, /*RequiresNullTerminator=*/false);
@@ -1145,7 +1144,7 @@ static int performOperation(ArchiveOperation Operation,
if (Archive->isThin())
CompareFullPath = true;
performOperation(Operation, Archive.get(), std::move(Buf.get()),
- NewMembers);
+ /*NewMembers=*/nullptr);
return 0;
}
@@ -1160,7 +1159,7 @@ static int performOperation(ArchiveOperation Operation,
}
}
- performOperation(Operation, nullptr, nullptr, NewMembers);
+ performOperation(Operation, nullptr, nullptr, /*NewMembers=*/nullptr);
return 0;
}
@@ -1403,8 +1402,7 @@ static int ar_main(int argc, char **argv) {
Options += *ArgIt + 1;
}
- ArchiveOperation Operation = parseCommandLine();
- return performOperation(Operation, nullptr);
+ return performOperation(parseCommandLine());
}
static int ranlib_main(int argc, char **argv) {
@@ -1442,7 +1440,7 @@ static int ranlib_main(int argc, char **argv) {
if (!ArchiveSpecified) {
badUsage("an archive name must be specified");
}
- return performOperation(CreateSymTab, nullptr);
+ return performOperation(CreateSymTab);
}
int llvm_ar_main(int argc, char **argv) {
More information about the llvm-branch-commits
mailing list