This didn't affect X86_64, which is the only client of this code at the moment,
as stubs and pointers are both 8-bytes there. It will affect other platforms
though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259575
91177308-0d34-0410-b5e6-
96231b3b80d8
/// @brief Get a pointer to the stub at the given index, which must be in
/// the range 0 .. getNumStubs() - 1.
void *getStub(unsigned Idx) const {
- return static_cast<uint64_t *>(StubsMem.base()) + Idx;
+ return static_cast<char *>(StubsMem.base()) + Idx * StubSize;
}
/// @brief Get a pointer to the implementation-pointer at the given index,