Move two methods out of line.

llvm-svn: 179176
This commit is contained in:
Rafael Espindola 2013-04-10 14:57:48 +00:00
parent 92684efb1d
commit 6bebee0d5c
1 changed files with 21 additions and 15 deletions

View File

@ -327,21 +327,8 @@ public:
SymbolTableEntry;
typedef typename MachOObjectFileHelper<is64Bits>::Section Section;
MachOObjectFile(MemoryBuffer *Object, error_code &ec) :
MachOObjectFileBase(Object, is64Bits, ec) {
DataRefImpl DRI;
moveToNextSection(DRI);
uint32_t LoadCommandCount = getHeader()->NumLoadCommands;
while (DRI.d.a < LoadCommandCount) {
Sections.push_back(DRI);
DRI.d.b++;
moveToNextSection(DRI);
}
}
static inline bool classof(const Binary *v) {
return v->getType() == getMachOType(true, is64Bits);
}
MachOObjectFile(MemoryBuffer *Object, error_code &ec);
static bool classof(const Binary *v);
const Section *getSection(DataRefImpl DRI) const;
const SymbolTableEntry *getSymbolTableEntry(DataRefImpl DRI) const;
@ -375,6 +362,25 @@ public:
void moveToNextSection(DataRefImpl &DRI) const;
};
template<bool is64Bits>
MachOObjectFile<is64Bits>::MachOObjectFile(MemoryBuffer *Object,
error_code &ec) :
MachOObjectFileBase(Object, is64Bits, ec) {
DataRefImpl DRI;
moveToNextSection(DRI);
uint32_t LoadCommandCount = getHeader()->NumLoadCommands;
while (DRI.d.a < LoadCommandCount) {
Sections.push_back(DRI);
DRI.d.b++;
moveToNextSection(DRI);
}
}
template<bool is64Bits>
bool MachOObjectFile<is64Bits>::classof(const Binary *v) {
return v->getType() == getMachOType(true, is64Bits);
}
template<bool is64Bits>
const typename MachOObjectFile<is64Bits>::Section *
MachOObjectFile<is64Bits>::getSection(DataRefImpl DRI) const {