13 #ifndef LLVM_OBJECT_SYMBOLICFILE_H 14 #define LLVM_OBJECT_SYMBOLICFILE_H 29 #include <system_error> 45 template <
typename OStream>
47 OS <<
"(" <<
format(
"0x%08" PRIxPTR, D.
p) <<
" (" <<
format(
"0x%08x", D.
d.
a)
48 <<
", " <<
format(
"0x%08x", D.
d.
b) <<
"))";
68 template <
class content_type>
70 :
public std::iterator<std::forward_iterator_tag, content_type> {
76 const content_type *
operator->()
const {
return &Current; }
78 const content_type &
operator*()
const {
return Current; }
81 return Current == other.Current;
85 return !(*
this == other);
105 SF_Undefined = 1U << 0,
108 SF_Absolute = 1U << 3,
110 SF_Indirect = 1U << 5,
111 SF_Exported = 1U << 6,
112 SF_FormatSpecific = 1U << 7,
117 SF_Executable = 1U << 11,
146 virtual void moveSymbolNext(
DataRefImpl &Symb)
const = 0;
172 createSymbolicFile(
StringRef ObjectPath);
181 : SymbolPimpl(SymbolP), OwningObject(Owner) {}
184 return SymbolPimpl == Other.SymbolPimpl;
188 return SymbolPimpl < Other.SymbolPimpl;
214 #endif // LLVM_OBJECT_SYMBOLICFILE_H raw_ostream & operator<<(raw_ostream &OS, const SectionedAddress &Addr)
bool operator<(const BasicSymbolRef &Other) const
const content_type & operator*() const
This class represents lattice values for constants.
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
bool operator==(const content_iterator &other) const
static void printName(raw_ostream &OS, StringRef Name)
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
bool operator!=(const content_iterator &other) const
DataRefImpl getRawDataRefImpl() const
static Expected< const T * > getObject(MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
Tagged union holding either a T or a Error.
bool operator!=(const DataRefImpl &a, const DataRefImpl &b)
bool operator==(const SectionedAddress &LHS, const SectionedAddress &RHS)
bool operator<(const SectionedAddress &LHS, const SectionedAddress &RHS)
struct llvm::object::DataRefImpl::@292 d
const content_type * operator->() const
content_iterator(content_type symb)
virtual uint32_t getSymbolFlags(DataRefImpl Symb) const =0
bool operator==(const BasicSymbolRef &Other) const
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.
Error printName(raw_ostream &OS) const
const SymbolicFile * getObject() const
static uint32_t getFlags(const Symbol *Sym)
content_iterator & operator++()
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
A range adaptor for a pair of iterators.
uint32_t getFlags() const
Get symbol flags (bitwise OR of SymbolRef::Flags)
Merge contiguous icmps into a memcmp
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
basic_symbol_iterator_range symbols() const
Lightweight error class with error context and mandatory checking.
This class implements an extremely fast bulk output stream that can only output to a stream...
virtual Error printSymbolName(raw_ostream &OS, DataRefImpl Symb) const =0
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)...