Don't duplicate names in comments and remove useless ones. Hopefully anyone
reading this knows what main is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220298
91177308-0d34-0410-b5e6-
96231b3b80d8
static const char *TemporaryOutput;
static int TmpArchiveFD = -1;
static const char *TemporaryOutput;
static int TmpArchiveFD = -1;
-// fail - Show the error message and exit.
+// Show the error message and exit.
LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) {
outs() << ToolName << ": " << Error << ".\n";
if (TmpArchiveFD != -1)
LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) {
outs() << ToolName << ": " << Error << ".\n";
if (TmpArchiveFD != -1)
-// MoreHelp - Provide additional help output explaining the operations and
-// modifiers of llvm-ar. This object instructs the CommandLine library
-// to print the text of the constructor when the --help option is given.
+// Provide additional help output explaining the operations and modifiers of
+// llvm-ar. This object instructs the CommandLine library to print the text of
+// the constructor when the --help option is given.
static cl::extrahelp MoreHelp(
"\nOPERATIONS:\n"
" d[NsS] - delete file(s) from the archive\n"
static cl::extrahelp MoreHelp(
"\nOPERATIONS:\n"
" d[NsS] - delete file(s) from the archive\n"
// on the command line.
static std::vector<std::string> Members;
// on the command line.
static std::vector<std::string> Members;
-// show_help - Show the error message, the help message and exit.
+// Show the error message, the help message and exit.
LLVM_ATTRIBUTE_NORETURN static void
show_help(const std::string &msg) {
errs() << ToolName << ": " << msg << "\n\n";
LLVM_ATTRIBUTE_NORETURN static void
show_help(const std::string &msg) {
errs() << ToolName << ": " << msg << "\n\n";
-// getRelPos - Extract the member filename from the command line for
-// the [relpos] argument associated with a, b, and i modifiers
+// Extract the member filename from the command line for the [relpos] argument
+// associated with a, b, and i modifiers
static void getRelPos() {
if(RestOfArgs.size() == 0)
show_help("Expected [relpos] for a, b, or i modifier");
static void getRelPos() {
if(RestOfArgs.size() == 0)
show_help("Expected [relpos] for a, b, or i modifier");
RestOfArgs.erase(RestOfArgs.begin());
}
RestOfArgs.erase(RestOfArgs.begin());
}
-// getArchive - Get the archive file name from the command line
+// Get the archive file name from the command line
static void getArchive() {
if(RestOfArgs.size() == 0)
show_help("An archive name must be specified");
static void getArchive() {
if(RestOfArgs.size() == 0)
show_help("An archive name must be specified");
RestOfArgs.erase(RestOfArgs.begin());
}
RestOfArgs.erase(RestOfArgs.begin());
}
-// getMembers - Copy over remaining items in RestOfArgs to our Members vector
-// This is just for clarity.
+// Copy over remaining items in RestOfArgs to our Members vector
static void getMembers() {
if(RestOfArgs.size() > 0)
Members = std::vector<std::string>(RestOfArgs);
static void getMembers() {
if(RestOfArgs.size() > 0)
Members = std::vector<std::string>(RestOfArgs);
return ReplaceOrInsert;
}
return ReplaceOrInsert;
}
-// parseCommandLine - Parse the command line options as presented and return the
-// operation specified. Process all modifiers and check to make sure that
-// constraints on modifier/operation pairs have not been violated.
+// Parse the command line options as presented and return the operation
+// specified. Process all modifiers and check to make sure that constraints on
+// modifier/operation pairs have not been violated.
static ArchiveOperation parseCommandLine() {
if (MRI) {
if (!RestOfArgs.empty())
static ArchiveOperation parseCommandLine() {
if (MRI) {
if (!RestOfArgs.empty())
outs().write(Data.data(), Data.size());
}
outs().write(Data.data(), Data.size());
}
-// putMode - utility function for printing out the file mode when the 't'
-// operation is in verbose mode.
+// Utility function for printing out the file mode when the 't' operation is in
+// verbose mode.
static void printMode(unsigned mode) {
if (mode & 004)
outs() << "r";
static void printMode(unsigned mode) {
if (mode & 004)
outs() << "r";
static int ar_main(char **argv);
static int ranlib_main();
static int ar_main(char **argv);
static int ranlib_main();
-// main - main program for llvm-ar .. see comments in the code
int main(int argc, char **argv) {
ToolName = argv[0];
// Print a stack trace if we signal out.
int main(int argc, char **argv) {
ToolName = argv[0];
// Print a stack trace if we signal out.