From 78fcc47aeedc93e294a94714b6bcd69ff0b06d5f Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 10 Apr 2013 14:57:48 +0000 Subject: [PATCH] Move two methods out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179176 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/MachO.h | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 1b0ca29543a..2eb094af4c4 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -327,21 +327,8 @@ public: SymbolTableEntry; typedef typename MachOObjectFileHelper::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 +MachOObjectFile::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 MachOObjectFile::classof(const Binary *v) { + return v->getType() == getMachOType(true, is64Bits); +} + template const typename MachOObjectFile::Section * MachOObjectFile::getSection(DataRefImpl DRI) const { -- 2.34.1