17 #ifndef LLVM_OBJECT_WASM_H 18 #define LLVM_OBJECT_WASM_H 24 #include "llvm/Config/llvm-config.h" 41 : Info(Info), FunctionType(FunctionType), GlobalType(GlobalType) {}
93 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 144 void moveSymbolNext(
DataRefImpl &Symb)
const override;
154 uint64_t getWasmSymbolValue(
const WasmSymbol& Sym)
const;
155 uint64_t getSymbolValueImpl(
DataRefImpl Symb)
const override;
157 uint64_t getCommonSymbolSizeImpl(
DataRefImpl Symb)
const override;
162 void moveSectionNext(
DataRefImpl &Sec)
const override;
165 uint64_t getSectionAddress(
DataRefImpl Sec)
const override;
166 uint64_t getSectionIndex(
DataRefImpl Sec)
const override;
167 uint64_t getSectionSize(
DataRefImpl Sec)
const override;
168 std::error_code getSectionContents(
DataRefImpl Sec,
170 uint64_t getSectionAlignment(
DataRefImpl Sec)
const override;
171 bool isSectionCompressed(
DataRefImpl Sec)
const override;
172 bool isSectionText(
DataRefImpl Sec)
const override;
173 bool isSectionData(
DataRefImpl Sec)
const override;
175 bool isSectionVirtual(
DataRefImpl Sec)
const override;
176 bool isSectionBitcode(
DataRefImpl Sec)
const override;
181 void moveRelocationNext(
DataRefImpl &Rel)
const override;
182 uint64_t getRelocationOffset(
DataRefImpl Rel)
const override;
184 uint64_t getRelocationType(
DataRefImpl Rel)
const override;
190 uint8_t getBytesInAddress()
const override;
191 StringRef getFileFormatName()
const override;
194 bool isRelocatableObject()
const override;
242 std::vector<WasmSection> Sections;
243 std::vector<wasm::WasmSignature> Signatures;
244 std::vector<uint32_t> FunctionTypes;
245 std::vector<wasm::WasmTable> Tables;
246 std::vector<wasm::WasmLimits> Memories;
247 std::vector<wasm::WasmGlobal> Globals;
248 std::vector<wasm::WasmImport> Imports;
249 std::vector<wasm::WasmExport> Exports;
250 std::vector<wasm::WasmElemSegment> ElemSegments;
251 std::vector<WasmSegment> DataSegments;
252 std::vector<wasm::WasmFunction> Functions;
253 std::vector<WasmSymbol> Symbols;
254 std::vector<wasm::WasmFunctionName> DebugNames;
256 bool HasLinkingSection =
false;
275 #endif // LLVM_OBJECT_WASM_H const wasm::WasmLinkingData & linkingData() const
bool isTypeSection() const
ArrayRef< WasmSegment > dataSegments() const
Compute iterated dominance frontiers using a linear time algorithm.
ArrayRef< wasm::WasmExport > exports() const
const unsigned WASM_SYMBOL_BINDING_LOCAL
uint32_t getNumberOfSymbols() const
bool isTypeGlobal() const
static const char * getPtr(const MachOObjectFile &O, size_t Offset)
ArrayRef< wasm::WasmImport > imports() const
WasmSymbol(const wasm::WasmSymbolInfo &Info, const wasm::WasmSignature *FunctionType, const wasm::WasmGlobalType *GlobalType)
This class is the base class for all object file types.
ArrayRef< uint32_t > functionTypes() const
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
ArrayRef< wasm::WasmFunctionName > debugNames() const
uint32_t getNumImportedGlobals() const
uint32_t getNumImportedFunctions() const
bool isBindingGlobal() const
unsigned getBinding() const
const unsigned WASM_SYMBOL_UNDEFINED
std::vector< wasm::WasmRelocation > Relocations
ArrayRef< wasm::WasmFunction > functions() const
This is a value type class that represents a single relocation in the list of relocations in the obje...
The access may reference the value stored in memory.
ArrayRef< wasm::WasmLimits > memories() const
Tagged union holding either a T or a Error.
ArrayRef< wasm::WasmTable > tables() const
static bool classof(const Binary *v)
Class to represent function types.
unsigned getVisibility() const
wasm::WasmDataSegment Data
ArrayRef< wasm::WasmSignature > types() const
bool isBindingLocal() const
LLVM_DUMP_METHOD void dump() const
ArrayRef< uint8_t > Content
The instances of the Type class are immutable: once they are created, they are never changed...
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
ArrayRef< wasm::WasmElemSegment > elements() const
const unsigned WASM_SYMBOL_BINDING_WEAK
ArrayRef< wasm::WasmGlobal > globals() const
const unsigned WASM_SYMBOL_VISIBILITY_MASK
uint32_t startFunction() const
const unsigned WASM_SYMBOL_BINDING_GLOBAL
const wasm::WasmSymbolInfo & Info
ArrayRef< WasmSymbol > syms() const
bool isTypeFunction() const
Manages the enabling and disabling of subtarget specific features.
This is a value type class that represents a single symbol in the list of symbols in the object file...
static std::unique_ptr< PDBSymbol > getSymbolType(const PDBSymbol &Symbol)
const unsigned WASM_SYMBOL_BINDING_MASK
const wasm::WasmGlobalType * GlobalType
OStream & operator<<(OStream &OS, const DataRefImpl &D)
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 wasm::WasmSignature * FunctionType
StringRef - Represent a constant reference to a string, i.e.
static FeatureBitset getFeatures(StringRef CPU, StringRef FS, ArrayRef< SubtargetFeatureKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures)
bool isBindingWeak() const
This is a value type class that represents a single section in the list of sections in the object fil...
StringRef getSymbolName(CVSymbol Sym)
void print(raw_ostream &Out) const