diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:45:00 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:45:00 +0000 | 
| commit | 12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (patch) | |
| tree | ae1a7fcfc24a8d4b23206c57121c3f361d4b7f84 /include/llvm/Object/Wasm.h | |
| parent | d99dafe2e4a385dd2a6c76da6d8258deb100657b (diff) | |
Notes
Diffstat (limited to 'include/llvm/Object/Wasm.h')
| -rw-r--r-- | include/llvm/Object/Wasm.h | 13 | 
1 files changed, 9 insertions, 4 deletions
diff --git a/include/llvm/Object/Wasm.h b/include/llvm/Object/Wasm.h index 43ad62be68b6..6b6bbe252f65 100644 --- a/include/llvm/Object/Wasm.h +++ b/include/llvm/Object/Wasm.h @@ -17,6 +17,8 @@  #ifndef LLVM_OBJECT_WASM_H  #define LLVM_OBJECT_WASM_H +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h"  #include "llvm/Object/Binary.h"  #include "llvm/Object/ObjectFile.h"  #include "llvm/Support/Error.h" @@ -47,10 +49,10 @@ public:  class WasmSection {  public: -  WasmSection() : Type(0), Offset(0) {} +  WasmSection() = default; -  uint32_t Type; // Section type (See below) -  uint32_t Offset; // Offset with in the file +  uint32_t Type = 0; // Section type (See below) +  uint32_t Offset = 0; // Offset with in the file    StringRef Name; // Section name (User-defined sections only)    ArrayRef<uint8_t> Content; // Section content    std::vector<wasm::WasmRelocation> Relocations; // Relocations for this section @@ -74,12 +76,15 @@ public:    const std::vector<wasm::WasmLimits>& memories() const { return Memories; }    const std::vector<wasm::WasmGlobal>& globals() const { return Globals; }    const std::vector<wasm::WasmExport>& exports() const { return Exports; } +    const std::vector<wasm::WasmElemSegment>& elements() const {      return ElemSegments;    } +    const std::vector<wasm::WasmDataSegment>& dataSegments() const {      return DataSegments;    } +    const std::vector<wasm::WasmFunction>& functions() const { return Functions; }    const ArrayRef<uint8_t>& code() const { return CodeSection; }    uint32_t startFunction() const { return StartFunction; } @@ -178,7 +183,7 @@ private:    std::vector<WasmSymbol> Symbols;    std::vector<wasm::WasmFunction> Functions;    ArrayRef<uint8_t> CodeSection; -  uint32_t StartFunction; +  uint32_t StartFunction = -1;  };  } // end namespace object  | 
