From eaae687d3e8211c0adeaedb7b6730529f7bc5e4f Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 10 Apr 2013 03:48:25 +0000 Subject: Template the MachO types over endianness. For now they are still only used as little endian. llvm-svn: 179147 --- llvm/lib/Object/MachOObjectFile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 20b66d94e8c..33c63b0f896 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -127,8 +127,8 @@ MachOObjectFileBase::getSymbolTableEntryBase(DataRefImpl DRI, unsigned Index = DRI.d.b; unsigned SymbolTableEntrySize = is64Bit() ? - sizeof(MachOFormat::SymbolTableEntry) : - sizeof(MachOFormat::SymbolTableEntry); + sizeof(MachOObjectFile::SymbolTableEntry) : + sizeof(MachOObjectFile::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) : - sizeof(MachOFormat::SegmentLoadCommand); - unsigned SectionSize = Is64 ? sizeof(MachOFormat::Section) : - sizeof(MachOFormat::Section); + Is64 ? sizeof(MachOObjectFile::SegmentLoadCommand) : + sizeof(MachOObjectFile::SegmentLoadCommand); + unsigned SectionSize = Is64 ? sizeof(MachOObjectFile::Section) : + sizeof(MachOObjectFile::Section); uintptr_t SectionAddr = CommandAddr + SegmentLoadSize + DRI.d.b * SectionSize; return reinterpret_cast(SectionAddr); -- cgit v1.2.3