diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-25 22:43:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-03-25 22:43:53 +0000 |
commit | 78f7e6f04fed54619122d8ffcc5d11808d0f4feb (patch) | |
tree | f1106c16402dd1a207564190abb6931908958cd2 /include | |
parent | fe07617f803ffd24d02bc9645112caf4f5f9f54a (diff) | |
download | llvm-78f7e6f04fed54619122d8ffcc5d11808d0f4feb.tar.gz llvm-78f7e6f04fed54619122d8ffcc5d11808d0f4feb.tar.bz2 llvm-78f7e6f04fed54619122d8ffcc5d11808d0f4feb.tar.xz |
Use Endian.h to simplify this code a bit.
While at it, factor some logic into FragmentWriter. This will allow more code
to be factored out of the fairly large ELFObjectWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCELFObjectWriter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/MC/MCELFObjectWriter.h b/include/llvm/MC/MCELFObjectWriter.h index 92ad1b1a46..9e7c2cce66 100644 --- a/include/llvm/MC/MCELFObjectWriter.h +++ b/include/llvm/MC/MCELFObjectWriter.h @@ -107,16 +107,16 @@ public: #define R_SSYM_MASK 0x00ffffff // N64 relocation type accessors - unsigned getRType(uint32_t Type) const { + uint8_t getRType(uint32_t Type) const { return (unsigned)((Type >> R_TYPE_SHIFT) & 0xff); } - unsigned getRType2(uint32_t Type) const { + uint8_t getRType2(uint32_t Type) const { return (unsigned)((Type >> R_TYPE2_SHIFT) & 0xff); } - unsigned getRType3(uint32_t Type) const { + uint8_t getRType3(uint32_t Type) const { return (unsigned)((Type >> R_TYPE3_SHIFT) & 0xff); } - unsigned getRSsym(uint32_t Type) const { + uint8_t getRSsym(uint32_t Type) const { return (unsigned)((Type >> R_SSYM_SHIFT) & 0xff); } |