LLVM  15.0.0git
TarWriter.h
Go to the documentation of this file.
1 //===-- llvm/Support/TarWriter.h - Tar archive file creator -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_SUPPORT_TARWRITER_H
10 #define LLVM_SUPPORT_TARWRITER_H
11 
12 #include "llvm/ADT/StringRef.h"
13 #include "llvm/ADT/StringSet.h"
14 #include "llvm/Support/Error.h"
16 
17 namespace llvm {
18 class TarWriter {
19 public:
21  StringRef BaseDir);
22 
23  void append(StringRef Path, StringRef Data);
24 
25 private:
26  TarWriter(int FD, StringRef BaseDir);
27  raw_fd_ostream OS;
28  std::string BaseDir;
29  StringSet<> Files;
30 };
31 }
32 
33 #endif
llvm::TarWriter::append
void append(StringRef Path, StringRef Data)
Definition: TarWriter.cpp:184
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
StringRef.h
Error.h
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::StringSet
StringSet - A wrapper for StringMap that provides set-like functionality.
Definition: StringSet.h:23
llvm::TarWriter
Definition: TarWriter.h:18
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::raw_fd_ostream
A raw_ostream that writes to a file descriptor.
Definition: raw_ostream.h:444
StringSet.h
llvm::TarWriter::create
static Expected< std::unique_ptr< TarWriter > > create(StringRef OutputPath, StringRef BaseDir)
Definition: TarWriter.cpp:169
raw_ostream.h