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) <<
"))";
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);
106 SF_Undefined = 1U << 0,
109 SF_Absolute = 1U << 3,
111 SF_Indirect = 1U << 5,
112 SF_Exported = 1U << 6,
113 SF_FormatSpecific = 1U << 7,
118 SF_Executable = 1U << 11,
147 virtual void moveSymbolNext(
DataRefImpl &Symb)
const = 0;
149 virtual std::error_code printSymbolName(
raw_ostream &OS,
174 createSymbolicFile(
StringRef ObjectPath);
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
std::error_code printName(raw_ostream &OS) 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...
static std::error_code getObject(const T *&Obj, MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
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 DataRefImpl &a, const DataRefImpl &b)
bool operator!=(const content_iterator &other) const
DataRefImpl getRawDataRefImpl() const
Tagged union holding either a T or a Error.
bool operator!=(const DataRefImpl &a, const DataRefImpl &b)
struct llvm::object::DataRefImpl::@282 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.
const SymbolicFile * getObject() const
bool operator==(const DataRefImpl &a, const DataRefImpl &b)
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
virtual std::error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const =0
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
OStream & operator<<(OStream &OS, const DataRefImpl &D)
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)...