LLVM: include/llvm/Object/SymbolicFile.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_OBJECT_SYMBOLICFILE_H
14#define LLVM_OBJECT_SYMBOLICFILE_H
15
22#include
23#include
24#include
25#include
26#include
27
28namespace llvm {
29
30class LLVMContext;
31class raw_ostream;
32
33namespace object {
34
36
37
38 struct {
42
44};
45
46template
48 OS << "(" << format("0x%08" PRIxPTR, D.p) << " (" << format("0x%08x", D.d.a)
49 << ", " << format("0x%08x", D.d.b) << "))";
50 return OS;
51}
52
54
55
56 return std::memcmp(&a, &b, sizeof(DataRefImpl)) == 0;
57}
58
61}
62
64
65
66 return std::memcmp(&a, &b, sizeof(DataRefImpl)) < 0;
67}
68
70 content_type Current;
71
72public:
78
80
81 const content_type *operator->() const { return &Current; }
82
83 const content_type &operator*() const { return Current; }
84
86 return Current == other.Current;
87 }
88
90 return !(*this == other);
91 }
92
94 Current.moveNext();
95 return *this;
96 }
97};
98
99class SymbolicFile;
100
101
102
106
107public:
110 SF_Undefined = 1U << 0,
115 SF_Indirect = 1U << 5,
116 SF_Exported = 1U << 6,
118
122 SF_Executable = 1U << 11,
123
124 };
125
128
131
133
135
136
138
141};
142
144
146public:
149
150
152
154
156
158
160
162
163
167 }
168
169
172 LLVMContext *Context, bool InitContent = true);
173
177 }
178
180 return v->isSymbolic();
181 }
182
184};
185
188 : SymbolPimpl(SymbolP), OwningObject(Owner) {}
189
191 return SymbolPimpl == Other.SymbolPimpl;
192}
193
195 return SymbolPimpl < Other.SymbolPimpl;
196}
197
200}
201
204}
205
208}
209
211 return SymbolPimpl;
212}
213
215 return OwningObject;
216}
217
218}
219}
220
221#endif
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
This is an important class for using LLVM in a threaded context.
The instances of the Type class are immutable: once they are created, they are never changed.
A range adaptor for a pair of iterators.
This is a value type class that represents a single symbol in the list of symbols in the object file.
Expected< uint32_t > getFlags() const
Get symbol flags (bitwise OR of SymbolRef::Flags)
const SymbolicFile * getObject() const
DataRefImpl getRawDataRefImpl() const
bool operator==(const BasicSymbolRef &Other) const
Error printName(raw_ostream &OS) const
bool operator<(const BasicSymbolRef &Other) const
static bool classof(const Binary *v)
virtual basic_symbol_iterator symbol_begin() const =0
iterator_range< basic_symbol_iterator > basic_symbol_iterator_range
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context, bool InitContent=true)
virtual bool is64Bit() const =0
virtual basic_symbol_iterator symbol_end() const =0
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile(MemoryBufferRef Object)
virtual Error printSymbolName(raw_ostream &OS, DataRefImpl Symb) const =0
virtual Expected< uint32_t > getSymbolFlags(DataRefImpl Symb) const =0
basic_symbol_iterator_range symbols() const
static bool isSymbolicFile(file_magic Type, const LLVMContext *Context)
virtual void moveSymbolNext(DataRefImpl &Symb) const =0
const content_type & operator*() const
const content_type * operator->() const
std::forward_iterator_tag iterator_category
bool operator==(const content_iterator &other) const
content_iterator & operator++()
bool operator!=(const content_iterator &other) const
std::ptrdiff_t difference_type
content_iterator(content_type symb)
This class implements an extremely fast bulk output stream that can only output to a stream.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
bool operator<(const ELFSymbolRef &A, const ELFSymbolRef &B)
bool operator!=(const DataRefImpl &a, const DataRefImpl &b)
raw_ostream & operator<<(raw_ostream &OS, const SectionedAddress &Addr)
This is an optimization pass for GlobalISel generic memory operations.
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...
@ unknown
Unrecognized file.
struct llvm::object::DataRefImpl::@371 d