diff options
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r-- | llvm/lib/Object/WasmObjectFile.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index 3a5dc385421..7423dc9726a 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -255,7 +255,7 @@ WasmObjectFile::WasmObjectFile(MemoryBufferRef Buffer, Error &Err) } 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(); @@ -1173,10 +1173,6 @@ Error WasmObjectFile::parseDataSection(ReadContext &Ctx) { 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; } |