16#ifndef LLVM_OBJECT_WASM_H
17#define LLVM_OBJECT_WASM_H
22#include "llvm/Config/llvm-config.h"
104#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
143 return TargetFeatures;
164 void moveSymbolNext(
DataRefImpl &Symb)
const override;
173 bool is64Bit()
const override {
return false; }
186 void moveSectionNext(
DataRefImpl &Sec)
const override;
192 getSectionContents(
DataRefImpl Sec)
const override;
194 bool isSectionCompressed(
DataRefImpl Sec)
const override;
195 bool isSectionText(
DataRefImpl Sec)
const override;
196 bool isSectionData(
DataRefImpl Sec)
const override;
198 bool isSectionVirtual(
DataRefImpl Sec)
const override;
203 void moveRelocationNext(
DataRefImpl &Rel)
const override;
212 uint8_t getBytesInAddress()
const override;
213 StringRef getFileFormatName()
const override;
216 bool isRelocatableObject()
const override;
217 bool isSharedObject()
const;
280 std::vector<WasmSection> Sections;
283 std::vector<wasm::WasmFeatureEntry> TargetFeatures;
285 std::vector<wasm::WasmTable> Tables;
286 std::vector<wasm::WasmLimits> Memories;
287 std::vector<wasm::WasmGlobal> Globals;
288 std::vector<wasm::WasmTag> Tags;
289 std::vector<wasm::WasmImport> Imports;
290 std::vector<wasm::WasmExport> Exports;
291 std::vector<wasm::WasmElemSegment> ElemSegments;
292 std::vector<WasmSegment> DataSegments;
293 std::optional<size_t> DataCount;
294 std::vector<wasm::WasmFunction> Functions;
295 std::vector<WasmSymbol> Symbols;
298 bool HasLinkingSection =
false;
299 bool HasDylinkSection =
false;
300 bool HasMemory64 =
false;
301 bool HasUnmodeledTypes =
false;
367 int getSectionOrder(
unsigned ID,
StringRef CustomSectionName =
"");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static StringRef getSymbolName(SymbolKind SymKind)
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
static FeatureBitset getFeatures(MCSubtargetInfo &STI, StringRef CPU, StringRef TuneCPU, StringRef FS, ArrayRef< StringRef > ProcNames, ArrayRef< SubtargetSubTypeKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures)
static const FuncProtoTy Signatures[]
static std::unique_ptr< PDBSymbol > getSymbolType(const PDBSymbol &Symbol)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
This class is the base class for all object file types.
This is a value type class that represents a single relocation in the list of relocations in the obje...
This is a value type class that represents a single section in the list of sections in the object fil...
This is a value type class that represents a single symbol in the list of symbols in the object file.
ArrayRef< wasm::WasmSignature > types() const
ArrayRef< wasm::WasmElemSegment > elements() const
const wasm::WasmProducerInfo & getProducerInfo() const
bool hasUnmodeledTypes() const
uint32_t startFunction() const
uint32_t getNumberOfSymbols() const
ArrayRef< wasm::WasmLimits > memories() const
bool is64Bit() const override
ArrayRef< wasm::WasmExport > exports() const
uint32_t getNumImportedTags() const
ArrayRef< wasm::WasmImport > imports() const
ArrayRef< wasm::WasmTag > tags() const
ArrayRef< wasm::WasmDebugName > debugNames() const
const wasm::WasmLinkingData & linkingData() const
ArrayRef< wasm::WasmFeatureEntry > getTargetFeatures() const
uint32_t getNumImportedTables() const
static bool classof(const Binary *v)
ArrayRef< wasm::WasmGlobal > globals() const
ArrayRef< wasm::WasmTable > tables() const
uint32_t getNumImportedFunctions() const
ArrayRef< WasmSegment > dataSegments() const
const wasm::WasmDylinkInfo & dylinkInfo() const
ArrayRef< wasm::WasmFunction > functions() const
uint32_t getNumImportedGlobals() const
uint32_t getNumSections() const
@ WASM_SEC_ORDER_TARGET_FEATURES
@ WASM_SEC_ORDER_PRODUCERS
@ WASM_SEC_ORDER_DATACOUNT
@ WASM_SEC_ORDER_FUNCTION
LLVM_ABI bool isValidSectionOrder(unsigned ID, StringRef CustomSectionName="")
static LLVM_ABI int DisallowedPredecessors[WASM_NUM_SEC_ORDERS][WASM_NUM_SEC_ORDERS]
bool isTypeFunction() const
unsigned getBinding() const
LLVM_DUMP_METHOD void dump() const
bool isBindingWeak() const
bool isTypeSection() const
bool isBindingGlobal() const
unsigned getVisibility() const
wasm::WasmSymbolInfo Info
const wasm::WasmGlobalType * GlobalType
WasmSymbol(const wasm::WasmSymbolInfo &Info, const wasm::WasmGlobalType *GlobalType, const wasm::WasmTableType *TableType, const wasm::WasmSignature *Signature)
LLVM_ABI void print(raw_ostream &Out) const
const wasm::WasmTableType * TableType
bool isBindingLocal() const
bool isTypeGlobal() const
const wasm::WasmSignature * Signature
This class implements an extremely fast bulk output stream that can only output to a stream.
const unsigned WASM_SYMBOL_UNDEFINED
const unsigned WASM_SYMBOL_BINDING_GLOBAL
const unsigned WASM_SYMBOL_BINDING_WEAK
const unsigned WASM_SYMBOL_BINDING_LOCAL
@ WASM_SYMBOL_TYPE_GLOBAL
@ WASM_SYMBOL_TYPE_SECTION
@ WASM_SYMBOL_TYPE_FUNCTION
const unsigned WASM_SYMBOL_BINDING_MASK
const unsigned WASM_SYMBOL_VISIBILITY_MASK
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
ArrayRef< uint8_t > Content
std::vector< wasm::WasmRelocation > Relocations
std::optional< uint8_t > HeaderSecSizeEncodingLen
wasm::WasmDataSegment Data
enum llvm::wasm::WasmSignature::@193 Kind