19 using namespace MachO;
29 uint32_t Flags = BasicSymbolRef::SF_Global;
31 Flags |= BasicSymbolRef::SF_Undefined;
33 Flags |= BasicSymbolRef::SF_Exported;
36 Flags |= BasicSymbolRef::SF_Weak;
45 if (!
Symbol->getArchitectures().has(Arch))
48 switch (
Symbol->getKind()) {
49 case SymbolKind::GlobalSymbol:
52 case SymbolKind::ObjectiveCClass:
64 case SymbolKind::ObjectiveCClassEHType:
68 case SymbolKind::ObjectiveCInstanceVariable:
79 const auto *Sym =
reinterpret_cast<const Symbol *
>(DRI.
p);
80 DRI.
p =
reinterpret_cast<uintptr_t
>(++Sym);
84 const auto *Sym =
reinterpret_cast<const Symbol *
>(DRI.
p);
85 OS << Sym->Prefix << Sym->Name;
90 const auto *Sym =
reinterpret_cast<const Symbol *
>(DRI.
p);
96 DRI.
p =
reinterpret_cast<uintptr_t
>(&*Symbols.begin());
102 DRI.
p =
reinterpret_cast<uintptr_t
>(&*Symbols.end());
Defines the interface file.
This class represents lattice values for constants.
static constexpr StringLiteral ObjC2ClassNamePrefix
basic_symbol_iterator symbol_begin() const override
void moveSymbolNext(DataRefImpl &DRI) const override
bool isWeakReferenced() const
static constexpr StringLiteral ObjC2MetaClassNamePrefix
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
static constexpr StringLiteral ObjC2EHTypePrefix
basic_symbol_iterator symbol_end() const override
static constexpr StringLiteral ObjC1ClassNamePrefix
static constexpr StringLiteral ObjC2IVarPrefix
Error printSymbolName(raw_ostream &OS, DataRefImpl DRI) const override
static ErrorSuccess success()
Create a success value.
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
static uint32_t getFlags(const Symbol *Sym)
uint32_t getSymbolFlags(DataRefImpl DRI) const override
This is a value type class that represents a single symbol in the list of symbols in the object file...
PlatformSet getPlatforms() const
Get the platforms.
bool isWeakDefined() 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...
const_symbol_range symbols() const
StringRef - Represent a constant reference to a string, i.e.
size_type count(const T &V) const
count - Return 1 if the element is in the set, 0 otherwise.