Differential Revision: https://reviews.llvm.org/D57719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353183
91177308-0d34-0410-b5e6-
96231b3b80d8
const WasmSection &getWasmSection(DataRefImpl Ref) const;
const wasm::WasmRelocation &getWasmRelocation(DataRefImpl Ref) const;
- const uint8_t *getPtr(size_t Offset) const;
Error parseSection(WasmSection &Sec);
Error parseCustomSection(WasmSection &Sec, ReadContext &Ctx);
}
ReadContext Ctx;
- Ctx.Start = getPtr(0);
+ Ctx.Start = reinterpret_cast<const uint8_t *>(getData().data());
Ctx.Ptr = Ctx.Start + 4;
Ctx.End = Ctx.Start + getData().size();
return Error::success();
}
-const uint8_t *WasmObjectFile::getPtr(size_t Offset) const {
- return reinterpret_cast<const uint8_t *>(getData().data() + Offset);
-}
-
const wasm::WasmObjectHeader &WasmObjectFile::getHeader() const {
return Header;
}