14 #ifndef LLVM_OBJECT_SYMBOLICFILE_H
15 #define LLVM_OBJECT_SYMBOLICFILE_H
30 #include <system_error>
46 template <
typename OStream>
48 OS <<
"(" <<
format(
"0x%08" PRIxPTR, D.
p) <<
" (" <<
format(
"0x%08x", D.
d.
a)
49 <<
", " <<
format(
"0x%08x", D.
d.
b) <<
"))";
56 return std::memcmp(&a, &b,
sizeof(
DataRefImpl)) == 0;
66 return std::memcmp(&a, &b,
sizeof(
DataRefImpl)) < 0;
69 template <
class content_type>
71 :
public std::iterator<std::forward_iterator_tag, content_type> {
77 const content_type *
operator->()
const {
return &Current; }
79 const content_type &
operator*()
const {
return Current; }
82 return Current == other.Current;
86 return !(*
this == other);
183 : SymbolPimpl(SymbolP), OwningObject(Owner) {}
186 return SymbolPimpl == Other.SymbolPimpl;
190 return SymbolPimpl < Other.SymbolPimpl;
216 #endif // LLVM_OBJECT_SYMBOLICFILE_H
bool operator==(const BasicSymbolRef &Other) const
DataRefImpl getRawDataRefImpl() const
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context)
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
bool operator<(const DataRefImpl &a, const DataRefImpl &b)
virtual basic_symbol_iterator symbol_begin() const =0
SymbolicFile(unsigned int Type, MemoryBufferRef Source)
bool operator<(const BasicSymbolRef &Other) const
Tagged union holding either a T or a Error.
bool operator!=(const DataRefImpl &a, const DataRefImpl &b)
bool operator!=(const content_iterator &other) const
format_object< Ts...> format(const char *Fmt, const Ts &...Vals)
These are helper functions used to produce formatted output.
content_iterator(content_type symb)
virtual uint32_t getSymbolFlags(DataRefImpl Symb) const =0
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
std::error_code printName(raw_ostream &OS) const
virtual basic_symbol_iterator symbol_end() const =0
struct llvm::object::DataRefImpl::@230 d
uint32_t getFlags() const
Get symbol flags (bitwise OR of SymbolRef::Flags)
bool operator==(const DataRefImpl &a, const DataRefImpl &b)
content_iterator & operator++()
A range adaptor for a pair of iterators.
basic_symbol_iterator_range symbols() const
bool operator==(const content_iterator &other) const
virtual std::error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const =0
iterator_range< basic_symbol_iterator > basic_symbol_iterator_range
const SymbolicFile * getObject() const
This is a value type class that represents a single symbol in the list of symbols in the object file...
virtual void moveSymbolNext(DataRefImpl &Symb) const =0
const content_type & operator*() const
OStream & operator<<(OStream &OS, const DataRefImpl &D)
const content_type * operator->() const
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
static bool classof(const Binary *v)
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object)
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...