[lld] r344177 - Eliminate dependency to formatv(). NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 10 13:29:30 PDT 2018
Author: ruiu
Date: Wed Oct 10 13:29:29 2018
New Revision: 344177
URL: http://llvm.org/viewvc/llvm-project?rev=344177&view=rev
Log:
Eliminate dependency to formatv(). NFC.
Modified:
lld/trunk/ELF/DriverUtils.cpp
lld/trunk/lib/Driver/DarwinLdDriver.cpp
lld/trunk/wasm/Driver.cpp
Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=344177&r1=344176&r2=344177&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Wed Oct 10 13:29:29 2018
@@ -24,7 +24,6 @@
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
@@ -140,9 +139,9 @@ opt::InputArgList ELFOptTable::parse(Arr
}
void elf::printHelp() {
- std::string Usage = formatv("{0} [options] file...", Config->ProgName).str();
- ELFOptTable().PrintHelp(outs(), Usage.c_str(), "lld", false /*ShowHidden*/,
- true /*ShowAllAliases*/);
+ ELFOptTable().PrintHelp(
+ outs(), (Config->ProgName + " [options] file...").str().c_str(), "lld",
+ false /*ShowHidden*/, true /*ShowAllAliases*/);
outs() << "\n";
// Scripts generated by Libtool versions up to at least 2.4.6 (the most
Modified: lld/trunk/lib/Driver/DarwinLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/DarwinLdDriver.cpp?rev=344177&r1=344176&r2=344177&view=diff
==============================================================================
--- lld/trunk/lib/Driver/DarwinLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/DarwinLdDriver.cpp Wed Oct 10 13:29:29 2018
@@ -44,7 +44,6 @@
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
@@ -384,9 +383,9 @@ bool parse(llvm::ArrayRef<const char *>
!parsedArgs.getLastArg(OPT_test_file_usage)) {
// If no -arch and no options at all, print usage message.
if (parsedArgs.size() == 0) {
- std::string Usage =
- llvm::formatv("{0} [options] file...", args[0]).str();
- table.PrintHelp(llvm::outs(), Usage.c_str(), "LLVM Linker", false);
+ table.PrintHelp(llvm::outs(),
+ (std::string(args[0]) + " [options] file...").c_str(),
+ "LLVM Linker", false);
} else {
error("-arch not specified and could not be inferred");
}
Modified: lld/trunk/wasm/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/Driver.cpp?rev=344177&r1=344176&r2=344177&view=diff
==============================================================================
--- lld/trunk/wasm/Driver.cpp (original)
+++ lld/trunk/wasm/Driver.cpp Wed Oct 10 13:29:29 2018
@@ -24,7 +24,6 @@
#include "llvm/Object/Wasm.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/TargetSelect.h"
@@ -350,8 +349,9 @@ void LinkerDriver::link(ArrayRef<const c
// Handle --help
if (Args.hasArg(OPT_help)) {
- std::string Usage = formatv("{0} [options] file...", ArgsArr[0]).str();
- Parser.PrintHelp(outs(), Usage.c_str(), "LLVM Linker", false);
+ Parser.PrintHelp(outs(),
+ (std::string(ArgsArr[0]) + " [options] file...").c_str(),
+ "LLVM Linker", false);
return;
}
More information about the llvm-commits
mailing list