diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 03:48:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 03:48:25 +0000 |
commit | a2561a0153237291980722383f409a6499b12efc (patch) | |
tree | 4626dff1b1c7fb3b694c460de6c22692c535ad45 /lib/Object/MachOObjectFile.cpp | |
parent | 774e7c82a84189a1f8194a63dc8040136ca6b4d8 (diff) |
Template the MachO types over endianness.
For now they are still only used as little endian.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | lib/Object/MachOObjectFile.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index 20b66d94e8..33c63b0f89 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -127,8 +127,8 @@ MachOObjectFileBase::getSymbolTableEntryBase(DataRefImpl DRI, unsigned Index = DRI.d.b; unsigned SymbolTableEntrySize = is64Bit() ? - sizeof(MachOFormat::SymbolTableEntry<true>) : - sizeof(MachOFormat::SymbolTableEntry<false>); + sizeof(MachOObjectFile<true>::SymbolTableEntry) : + sizeof(MachOObjectFile<false>::SymbolTableEntry); uint64_t Offset = SymbolTableOffset + Index * SymbolTableEntrySize; StringRef Data = getData(Offset, SymbolTableEntrySize); @@ -314,10 +314,10 @@ MachOObjectFileBase::getSectionBase(DataRefImpl DRI) const { bool Is64 = is64Bit(); unsigned SegmentLoadSize = - Is64 ? sizeof(MachOFormat::SegmentLoadCommand<true>) : - sizeof(MachOFormat::SegmentLoadCommand<false>); - unsigned SectionSize = Is64 ? sizeof(MachOFormat::Section<true>) : - sizeof(MachOFormat::Section<false>); + Is64 ? sizeof(MachOObjectFile<true>::SegmentLoadCommand) : + sizeof(MachOObjectFile<false>::SegmentLoadCommand); + unsigned SectionSize = Is64 ? sizeof(MachOObjectFile<true>::Section) : + sizeof(MachOObjectFile<false>::Section); uintptr_t SectionAddr = CommandAddr + SegmentLoadSize + DRI.d.b * SectionSize; return reinterpret_cast<const SectionBase*>(SectionAddr); |