1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[WebAssembly] Object: Remove redundant method. NFC.

Differential Revision: https://reviews.llvm.org/D57719

llvm-svn: 353183
This commit is contained in:
Sam Clegg 2019-02-05 16:30:21 +00:00
parent fb45770858
commit 72d22ece2e
2 changed files with 1 additions and 6 deletions

View File

@ -228,7 +228,6 @@ private:
const WasmSection &getWasmSection(DataRefImpl Ref) const; const WasmSection &getWasmSection(DataRefImpl Ref) const;
const wasm::WasmRelocation &getWasmRelocation(DataRefImpl Ref) const; const wasm::WasmRelocation &getWasmRelocation(DataRefImpl Ref) const;
const uint8_t *getPtr(size_t Offset) const;
Error parseSection(WasmSection &Sec); Error parseSection(WasmSection &Sec);
Error parseCustomSection(WasmSection &Sec, ReadContext &Ctx); Error parseCustomSection(WasmSection &Sec, ReadContext &Ctx);

View File

@ -255,7 +255,7 @@ WasmObjectFile::WasmObjectFile(MemoryBufferRef Buffer, Error &Err)
} }
ReadContext Ctx; ReadContext Ctx;
Ctx.Start = getPtr(0); Ctx.Start = reinterpret_cast<const uint8_t *>(getData().data());
Ctx.Ptr = Ctx.Start + 4; Ctx.Ptr = Ctx.Start + 4;
Ctx.End = Ctx.Start + getData().size(); Ctx.End = Ctx.Start + getData().size();
@ -1173,10 +1173,6 @@ Error WasmObjectFile::parseDataSection(ReadContext &Ctx) {
return Error::success(); 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 { const wasm::WasmObjectHeader &WasmObjectFile::getHeader() const {
return Header; return Header;
} }