From 95369163f58f06a6494ca9623184a8849ecf85f3 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 27 Nov 2010 06:39:22 +0000 Subject: Object/Mach-O: Validate Mach-O magic and initialize format info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120195 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/MachOObject.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/llvm/Object') diff --git a/include/llvm/Object/MachOObject.h b/include/llvm/Object/MachOObject.h index 74339cb..71164ac 100644 --- a/include/llvm/Object/MachOObject.h +++ b/include/llvm/Object/MachOObject.h @@ -43,10 +43,16 @@ public: private: OwningPtr Buffer; - -public: - MachOObject(MemoryBuffer *Buffer); + /// Whether the object is little endian. + bool IsLittleEndian; + /// Whether the object is 64-bit. + bool Is64Bit; + +private: + MachOObject(MemoryBuffer *Buffer, bool IsLittleEndian, bool Is64Bit); + +public: /// \brief Load a Mach-O object from a MemoryBuffer object. /// /// \param Buffer - The buffer to load the object from. This routine takes -- cgit v1.1