[PATCH] D57719: [WebAssembly] Object: Remove redundant method. NFC.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 15:38:17 PST 2019
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Herald added a project: LLVM.
Repository:
rL LLVM
https://reviews.llvm.org/D57719
Files:
include/llvm/Object/Wasm.h
lib/Object/WasmObjectFile.cpp
Index: lib/Object/WasmObjectFile.cpp
===================================================================
--- lib/Object/WasmObjectFile.cpp
+++ lib/Object/WasmObjectFile.cpp
@@ -255,7 +255,7 @@
}
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 @@
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;
}
Index: include/llvm/Object/Wasm.h
===================================================================
--- include/llvm/Object/Wasm.h
+++ include/llvm/Object/Wasm.h
@@ -228,7 +228,6 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57719.185179.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190204/6aa95408/attachment.bin>
More information about the llvm-commits
mailing list