From 72d22ece2e56484a8c1cd10ff5ff4fc2aeeb696c Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 5 Feb 2019 16:30:21 +0000 Subject: [PATCH] [WebAssembly] Object: Remove redundant method. NFC. Differential Revision: https://reviews.llvm.org/D57719 llvm-svn: 353183 --- include/llvm/Object/Wasm.h | 1 - lib/Object/WasmObjectFile.cpp | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/llvm/Object/Wasm.h b/include/llvm/Object/Wasm.h index ba842050d4a..ec498a3b679 100644 --- a/include/llvm/Object/Wasm.h +++ b/include/llvm/Object/Wasm.h @@ -228,7 +228,6 @@ private: 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); diff --git a/lib/Object/WasmObjectFile.cpp b/lib/Object/WasmObjectFile.cpp index 3a5dc385421..7423dc9726a 100644 --- a/lib/Object/WasmObjectFile.cpp +++ b/lib/Object/WasmObjectFile.cpp @@ -255,7 +255,7 @@ WasmObjectFile::WasmObjectFile(MemoryBufferRef Buffer, Error &Err) } ReadContext Ctx; - Ctx.Start = getPtr(0); + Ctx.Start = reinterpret_cast(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(getData().data() + Offset); -} - const wasm::WasmObjectHeader &WasmObjectFile::getHeader() const { return Header; }