14 #ifndef LLVM_OBJECT_ARCHIVE_H
15 #define LLVM_OBJECT_ARCHIVE_H
52 virtual void anchor();
69 assert(Parent == other.Parent);
116 return child == other.child;
120 return !(*
this == other);
124 return child < other.child;
135 uint32_t SymbolIndex;
136 uint32_t StringIndex;
140 return (Parent == other.Parent) && (SymbolIndex == other.SymbolIndex);
146 , StringIndex(stri) {}
160 return symbol == other.symbol;
164 return !(*
this == other);
186 child_iterator
child_begin(
bool SkipInternal =
true)
const;
217 child_iterator SymbolTable;
218 child_iterator StringTable;
219 child_iterator FirstRegular;
222 mutable std::vector<std::unique_ptr<MemoryBuffer>> ThinBuffers;
Represents either an error or a value T.
Archive(MemoryBufferRef Source, std::error_code &EC)
bool operator<(const child_iterator &other) const
symbol_iterator symbol_end() const
ErrorOr< std::unique_ptr< Binary > > getAsBinary(LLVMContext *Context=nullptr) const
bool operator==(const symbol_iterator &other) const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
uint64_t getRawSize() const
uint64_t getChildOffset() const
child_iterator child_begin(bool SkipInternal=true) const
sys::fs::perms getAccessMode() const
const Symbol * operator->() const
StringRef getSymbolTable() const
sys::TimeValue getLastModified() const
bool operator==(const child_iterator &other) const
StringRef rtrim(StringRef Chars=" \t\n\v\f\r") const
Return string with consecutive characters in Chars starting from the right removed.
const Symbol & operator*() const
child_iterator(const Child &c)
iterator_range< symbol_iterator > symbols() const
ErrorOr< MemoryBufferRef > getMemoryBufferRef() const
child_iterator & operator++()
bool operator!=(const symbol_iterator &other) const
const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
Symbol(const Archive *p, uint32_t symi, uint32_t stri)
ErrorOr< child_iterator > getMember() const
bool hasSymbolTable() const
child_iterator getSymbolTableChild() const
bool operator==(const Child &other) const
child_iterator child_end() const
This is an important class for using LLVM in a threaded context.
StringRef getName() const
bool operator==(const Symbol &other) const
Child(const Archive *Parent, const char *Start)
const Child * operator->() const
const Child & operator*() const
child_iterator findSym(StringRef name) const
symbol_iterator symbol_begin() const
A range adaptor for a pair of iterators.
static ErrorOr< std::unique_ptr< Archive > > create(MemoryBufferRef Source)
StringRef getRawName() const
ErrorOr< StringRef > getName() const
bool operator<(const Child &other) const
StringRef getRawLastModified() const
uint32_t getNumberOfSymbols() const
Provides ErrorOr<T> smart pointer.
This class is used where a precise fixed point in time is required.
static bool classof(Binary const *v)
ErrorOr< StringRef > getBuffer() const
StringRef - Represent a constant reference to a string, i.e.
iterator_range< child_iterator > children(bool SkipInternal=true) const
symbol_iterator(const Symbol &s)
bool operator!=(const child_iterator &other) const
symbol_iterator & operator++()