aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-08-22 19:00:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-11-13 20:39:49 +0000
commitfe6060f10f634930ff71b7c50291ddc610da2475 (patch)
tree1483580c790bd4d27b6500a7542b5ee00534d3cc /contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parentb61bce17f346d79cecfd8f195a64b10f77be43b1 (diff)
parent344a3780b2e33f6ca763666c380202b18aab72a3 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp b/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
index f3904b921e60..8f69282d3443 100644
--- a/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
+++ b/contrib/llvm-project/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
@@ -112,8 +112,8 @@ static void doList(opt::InputArgList& Args) {
std::unique_ptr<MemoryBuffer> B;
for (auto *Arg : Args.filtered(OPT_INPUT)) {
// Create or open the archive object.
- ErrorOr<std::unique_ptr<MemoryBuffer>> MaybeBuf =
- MemoryBuffer::getFile(Arg->getValue(), -1, false);
+ ErrorOr<std::unique_ptr<MemoryBuffer>> MaybeBuf = MemoryBuffer::getFile(
+ Arg->getValue(), /*IsText=*/false, /*RequiresNullTerminator=*/false);
fatalOpenError(errorCodeToError(MaybeBuf.getError()), Arg->getValue());
if (identify_magic(MaybeBuf.get()->getBuffer()) == file_magic::archive) {
@@ -287,7 +287,7 @@ int llvm::libDriverMain(ArrayRef<const char *> ArgsArr) {
// Handle /help
if (Args.hasArg(OPT_help)) {
- Table.PrintHelp(outs(), "llvm-lib [options] file...", "LLVM Lib");
+ Table.printHelp(outs(), "llvm-lib [options] file...", "LLVM Lib");
return 0;
}
@@ -339,8 +339,8 @@ int llvm::libDriverMain(ArrayRef<const char *> ArgsArr) {
continue;
// Open a file.
- ErrorOr<std::unique_ptr<MemoryBuffer>> MOrErr =
- MemoryBuffer::getFile(Path, -1, false);
+ ErrorOr<std::unique_ptr<MemoryBuffer>> MOrErr = MemoryBuffer::getFile(
+ Path, /*IsText=*/false, /*RequiresNullTerminator=*/false);
fatalOpenError(errorCodeToError(MOrErr.getError()), Path);
MemoryBufferRef MBRef = (*MOrErr)->getMemBufferRef();