[llvm] r353183 - [WebAssembly] Object: Remove redundant method. NFC.
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 08:30:21 PST 2019
Author: sbc
Date: Tue Feb 5 08:30:21 2019
New Revision: 353183
URL: http://llvm.org/viewvc/llvm-project?rev=353183&view=rev
Log:
[WebAssembly] Object: Remove redundant method. NFC.
Differential Revision: https://reviews.llvm.org/D57719
Modified:
llvm/trunk/include/llvm/Object/Wasm.h
llvm/trunk/lib/Object/WasmObjectFile.cpp
Modified: llvm/trunk/include/llvm/Object/Wasm.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Wasm.h?rev=353183&r1=353182&r2=353183&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Wasm.h (original)
+++ llvm/trunk/include/llvm/Object/Wasm.h Tue Feb 5 08:30:21 2019
@@ -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);
Modified: llvm/trunk/lib/Object/WasmObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/WasmObjectFile.cpp?rev=353183&r1=353182&r2=353183&view=diff
==============================================================================
--- llvm/trunk/lib/Object/WasmObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/WasmObjectFile.cpp Tue Feb 5 08:30:21 2019
@@ -255,7 +255,7 @@ WasmObjectFile::WasmObjectFile(MemoryBuf
}
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(R
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;
}
More information about the llvm-commits
mailing list