LLVM  8.0.1
TarWriter.h
Go to the documentation of this file.
1 //===-- llvm/Support/TarWriter.h - Tar archive file creator -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_SUPPORT_TAR_WRITER_H
11 #define LLVM_SUPPORT_TAR_WRITER_H
12 
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/ADT/StringSet.h"
15 #include "llvm/Support/Error.h"
17 
18 namespace llvm {
19 class TarWriter {
20 public:
22  StringRef BaseDir);
23 
24  void append(StringRef Path, StringRef Data);
25 
26 private:
27  TarWriter(int FD, StringRef BaseDir);
28  raw_fd_ostream OS;
29  std::string BaseDir;
30  StringSet<> Files;
31 };
32 }
33 
34 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
static Expected< std::unique_ptr< TarWriter > > create(StringRef OutputPath, StringRef BaseDir)
Definition: TarWriter.cpp:160
A raw_ostream that writes to a file descriptor.
Definition: raw_ostream.h:366
StringSet - A wrapper for StringMap that provides set-like functionality.
Definition: StringSet.h:28
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
void append(StringRef Path, StringRef Data)
Definition: TarWriter.cpp:174