LLVM  8.0.0svn
ArchiveWriter.h
Go to the documentation of this file.
1 //===- ArchiveWriter.h - ar archive file format writer ----------*- 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 // Declares the writeArchive function for writing an archive file.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_OBJECT_ARCHIVEWRITER_H
15 #define LLVM_OBJECT_ARCHIVEWRITER_H
16 
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/Object/Archive.h"
19 #include "llvm/Support/Error.h"
21 
22 namespace llvm {
23 
25  std::unique_ptr<MemoryBuffer> Buf;
28  unsigned UID = 0, GID = 0, Perms = 0644;
29 
30  bool IsNew = false;
31  NewArchiveMember() = default;
33 
35  getOldMember(const object::Archive::Child &OldMember, bool Deterministic);
36 
38  bool Deterministic);
39 };
40 
42  bool WriteSymtab, object::Archive::Kind Kind,
43  bool Deterministic, bool Thin,
44  std::unique_ptr<MemoryBuffer> OldArchiveBuf = nullptr);
45 }
46 
47 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Error writeArchive(StringRef ArcName, ArrayRef< NewArchiveMember > NewMembers, bool WriteSymtab, object::Archive::Kind Kind, bool Deterministic, bool Thin, std::unique_ptr< MemoryBuffer > OldArchiveBuf=nullptr)
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
static Expected< NewArchiveMember > getOldMember(const object::Archive::Child &OldMember, bool Deterministic)
static Expected< NewArchiveMember > getFile(StringRef FileName, bool Deterministic)
const unsigned Kind
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
std::unique_ptr< MemoryBuffer > Buf
Definition: ArchiveWriter.h:25
sys::TimePoint< std::chrono::seconds > ModTime
Definition: ArchiveWriter.h:27
std::chrono::time_point< std::chrono::system_clock, D > TimePoint
A time point on the system clock.
Definition: Chrono.h:34