summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/LibDriver/LibDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/LibDriver/LibDriver.cpp')
-rw-r--r--contrib/llvm/lib/LibDriver/LibDriver.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/llvm/lib/LibDriver/LibDriver.cpp b/contrib/llvm/lib/LibDriver/LibDriver.cpp
index b33a22f..3ae5434 100644
--- a/contrib/llvm/lib/LibDriver/LibDriver.cpp
+++ b/contrib/llvm/lib/LibDriver/LibDriver.cpp
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
// Defines an interface to a lib.exe-compatible driver that also understands
-// bitcode files. Used by llvm-lib and lld-link2 /lib.
+// bitcode files. Used by llvm-lib and lld-link /lib.
//
//===----------------------------------------------------------------------===//
@@ -51,7 +51,7 @@ static const llvm::opt::OptTable::Info infoTable[] = {
class LibOptTable : public llvm::opt::OptTable {
public:
- LibOptTable() : OptTable(infoTable, llvm::array_lengthof(infoTable), true) {}
+ LibOptTable() : OptTable(infoTable, true) {}
};
}
@@ -102,7 +102,7 @@ static Optional<std::string> findInputFile(StringRef File,
int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
SmallVector<const char *, 20> NewArgs(ArgsArr.begin(), ArgsArr.end());
BumpPtrAllocator Alloc;
- BumpPtrStringSaver Saver(Alloc);
+ StringSaver Saver(Alloc);
cl::ExpandResponseFiles(Saver, cl::TokenizeWindowsCommandLine, NewArgs);
ArgsArr = NewArgs;
@@ -135,14 +135,13 @@ int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
llvm::errs() << Arg->getValue() << ": no such file or directory\n";
return 1;
}
- Members.emplace_back(Saver.save(*Path),
- llvm::sys::path::filename(Arg->getValue()));
+ Members.emplace_back(Saver.save(*Path));
}
std::pair<StringRef, std::error_code> Result =
llvm::writeArchive(getOutputPath(&Args, Members[0]), Members,
/*WriteSymtab=*/true, object::Archive::K_GNU,
- /*Deterministic*/ true);
+ /*Deterministic*/ true, Args.hasArg(OPT_llvmlibthin));
if (Result.second) {
if (Result.first.empty())
OpenPOWER on IntegriCloud