diff options
Diffstat (limited to 'include/llvm/Object/Wasm.h')
-rw-r--r-- | include/llvm/Object/Wasm.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/Object/Wasm.h b/include/llvm/Object/Wasm.h index 5c8445f10f44..07ee4a4d6c4d 100644 --- a/include/llvm/Object/Wasm.h +++ b/include/llvm/Object/Wasm.h @@ -61,7 +61,7 @@ public: void print(raw_ostream &Out) const { Out << "Name=" << Name << ", Type=" << static_cast<int>(Type) - << ", Flags=" << Flags; + << ", Flags=" << Flags << " ElemIndex=" << ElementIndex; } #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) @@ -69,8 +69,7 @@ public: #endif }; -class WasmSection { -public: +struct WasmSection { WasmSection() = default; uint32_t Type = 0; // Section type (See below) @@ -80,6 +79,11 @@ public: std::vector<wasm::WasmRelocation> Relocations; // Relocations for this section }; +struct WasmSegment { + uint32_t SectionOffset; + wasm::WasmDataSegment Data; +}; + class WasmObjectFile : public ObjectFile { public: @@ -110,7 +114,7 @@ public: return ElemSegments; } - const std::vector<wasm::WasmDataSegment>& dataSegments() const { + const std::vector<WasmSegment>& dataSegments() const { return DataSegments; } @@ -210,7 +214,7 @@ private: std::vector<wasm::WasmImport> Imports; std::vector<wasm::WasmExport> Exports; std::vector<wasm::WasmElemSegment> ElemSegments; - std::vector<wasm::WasmDataSegment> DataSegments; + std::vector<WasmSegment> DataSegments; std::vector<wasm::WasmFunction> Functions; std::vector<WasmSymbol> Symbols; ArrayRef<uint8_t> CodeSection; |