[Orc] Stub addresses should be based on stub size, not pointer size.

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.

llvm-svn: 259575
This commit is contained in:
Lang Hames 2016-02-02 21:38:30 +00:00
parent d4f414583a
commit 3923698b3f
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ public:
/// @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,