diff options
author | Jeff Niu <jeff@modular.com> | 2024-07-09 21:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 21:44:37 -0700 |
commit | 5523a473ef3bcb611f2efc6d18f1ca7d9d023591 (patch) | |
tree | d87f22b884bb7d2a854fa2b273bb83b22f04c790 /llvm/lib/Object/ArchiveWriter.cpp | |
parent | b6e41c159b221faf1e43e56240cfd5a232697064 (diff) | |
download | llvm-5523a473ef3bcb611f2efc6d18f1ca7d9d023591.zip llvm-5523a473ef3bcb611f2efc6d18f1ca7d9d023591.tar.gz llvm-5523a473ef3bcb611f2efc6d18f1ca7d9d023591.tar.bz2 |
[llvm][object] Expose `writeArchiveToStream` (#98254)
This internal helper is a useful API to have, when one wants to write an
archive directly to some other preallocated stream.
Diffstat (limited to 'llvm/lib/Object/ArchiveWriter.cpp')
-rw-r--r-- | llvm/lib/Object/ArchiveWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp index 913b74c..34f12cf 100644 --- a/llvm/lib/Object/ArchiveWriter.cpp +++ b/llvm/lib/Object/ArchiveWriter.cpp @@ -997,10 +997,11 @@ Expected<std::string> computeArchiveRelativePath(StringRef From, StringRef To) { return std::string(Relative); } -static Error -writeArchiveToStream(raw_ostream &Out, ArrayRef<NewArchiveMember> NewMembers, - SymtabWritingMode WriteSymtab, object::Archive::Kind Kind, - bool Deterministic, bool Thin, std::optional<bool> IsEC) { +Error writeArchiveToStream(raw_ostream &Out, + ArrayRef<NewArchiveMember> NewMembers, + SymtabWritingMode WriteSymtab, + object::Archive::Kind Kind, bool Deterministic, + bool Thin, std::optional<bool> IsEC) { assert((!Thin || !isBSDLike(Kind)) && "Only the gnu format has a thin mode"); SmallString<0> SymNamesBuf; |