25 std::vector<NewArchiveMember> NewArchiveMembers;
44 Child,
Config.getCommonConfig().DeterministicArchives);
48 Member->Buf = std::make_unique<SmallVectorMemoryBuffer>(
49 std::move(Buffer), ChildNameOrErr.
get());
50 Member->MemberName = Member->Buf->getBufferIdentifier();
51 NewArchiveMembers.push_back(std::move(*Member));
56 return std::move(NewArchiveMembers);
90 std::copy(Member.Buf->getBufferStart(), Member.Buf->getBufferEnd(),
91 (*FB)->getBufferStart());
92 if (
Error E = (*FB)->commit())
102 if (!NewArchiveMembersOrErr)
103 return NewArchiveMembersOrErr.
takeError();
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
const T & front() const
front - Get the first element.
bool empty() const
empty - Check if the array is empty.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
reference get()
Returns a reference to the stored T value.
@ F_executable
Set the 'x' bit on the resulting file.
static Expected< std::unique_ptr< FileOutputBuffer > > create(StringRef FilePath, size_t Size, unsigned Flags=0)
Factory method to create an OutputBuffer object which manages a read/write buffer of the specified si...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
iterator_range< child_iterator > children(Error &Err, bool SkipInternal=true) const
bool hasSymbolTable() const
StringRef getFileName() const
A raw_ostream that writes to an SmallVector or SmallString.
static Error deepWriteArchive(StringRef ArcName, ArrayRef< NewArchiveMember > NewMembers, SymtabWritingMode WriteSymtab, object::Archive::Kind Kind, bool Deterministic, bool Thin)
Error executeObjcopyOnBinary(const MultiFormatConfig &Config, object::Binary &In, raw_ostream &Out)
Applies the transformations described by Config to In and writes the result into Out.
Error executeObjcopyOnArchive(const MultiFormatConfig &Config, const object::Archive &Ar)
Applies the transformations described by Config to each member in archive Ar.
Expected< std::vector< NewArchiveMember > > createNewArchiveMembers(const MultiFormatConfig &Config, const Archive &Ar)
Applies the transformations described by Config to each member in archive Ar.
This is an optimization pass for GlobalISel generic memory operations.
Error createFileError(const Twine &F, Error E)
Concatenate a source file path and/or name with an Error.
Error writeArchive(StringRef ArcName, ArrayRef< NewArchiveMember > NewMembers, SymtabWritingMode WriteSymtab, object::Archive::Kind Kind, bool Deterministic, bool Thin, std::unique_ptr< MemoryBuffer > OldArchiveBuf=nullptr, std::optional< bool > IsEC=std::nullopt, function_ref< void(Error)> Warn=warnToStderr)
static Expected< NewArchiveMember > getOldMember(const object::Archive::Child &OldMember, bool Deterministic)
bool DeterministicArchives