LLVM  9.0.0svn
ArchiveWriter.h
Go to the documentation of this file.
1 //===- ArchiveWriter.h - ar archive file format writer ----------*- 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 // Declares the writeArchive function for writing an archive file.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_OBJECT_ARCHIVEWRITER_H
14 #define LLVM_OBJECT_ARCHIVEWRITER_H
15 
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/Object/Archive.h"
18 #include "llvm/Support/Error.h"
20 
21 namespace llvm {
22 
24  std::unique_ptr<MemoryBuffer> Buf;
27  unsigned UID = 0, GID = 0, Perms = 0644;
28 
29  NewArchiveMember() = default;
31 
33  getOldMember(const object::Archive::Child &OldMember, bool Deterministic);
34 
36  bool Deterministic);
37 };
38 
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:23
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:22
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:32
BlockVerifier::State From
static Expected< NewArchiveMember > getOldMember(const object::Archive::Child &OldMember, bool Deterministic)
static Expected< NewArchiveMember > getFile(StringRef FileName, bool Deterministic)
std::string computeArchiveRelativePath(StringRef From, StringRef To)
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
std::unique_ptr< MemoryBuffer > Buf
Definition: ArchiveWriter.h:24
sys::TimePoint< std::chrono::seconds > ModTime
Definition: ArchiveWriter.h:26
std::chrono::time_point< std::chrono::system_clock, D > TimePoint
A time point on the system clock.
Definition: Chrono.h:33