mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix endianness bug.
Looks like llvm-readobj is the only customer of this code, and apparently there's no test to cover this function. I'll write it after finishing plumbing from llvm-objdump to there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34fae3adef
commit
e553a3ba42
@ -108,17 +108,20 @@ struct UnwindInfo {
|
||||
|
||||
/// \brief Return pointer to language specific data part of UnwindInfo.
|
||||
const void *getLanguageSpecificData() const {
|
||||
return reinterpret_cast<const void *>(&UnwindCodes[(NumCodes+1) & ~1]);
|
||||
return reinterpret_cast<const support::ulittle32_t *>(
|
||||
&UnwindCodes[(NumCodes + 1) & ~1]);
|
||||
}
|
||||
|
||||
/// \brief Return image-relative offset of language-specific exception handler.
|
||||
uint32_t getLanguageSpecificHandlerOffset() const {
|
||||
return *reinterpret_cast<const uint32_t *>(getLanguageSpecificData());
|
||||
return *reinterpret_cast<const support::ulittle32_t *>(
|
||||
getLanguageSpecificData());
|
||||
}
|
||||
|
||||
/// \brief Set image-relative offset of language-specific exception handler.
|
||||
void setLanguageSpecificHandlerOffset(uint32_t offset) {
|
||||
*reinterpret_cast<uint32_t *>(getLanguageSpecificData()) = offset;
|
||||
*reinterpret_cast<support::ulittle32_t *>(getLanguageSpecificData()) =
|
||||
offset;
|
||||
}
|
||||
|
||||
/// \brief Return pointer to exception-specific data.
|
||||
|
Loading…
Reference in New Issue
Block a user