| OLD | NEW |
| 1 //===- MachOObjectFile.cpp - Mach-O object file binding ---------*- C++ -*-===// | 1 //===- MachOObjectFile.cpp - Mach-O object file binding ---------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines the MachOObjectFile class, which binds the MachOObject | 10 // This file defines the MachOObjectFile class, which binds the MachOObject |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include <limits> | 23 #include <limits> |
| 24 | 24 |
| 25 using namespace llvm; | 25 using namespace llvm; |
| 26 using namespace object; | 26 using namespace object; |
| 27 | 27 |
| 28 namespace llvm { | 28 namespace llvm { |
| 29 namespace object { | 29 namespace object { |
| 30 | 30 |
| 31 MachOObjectFile::MachOObjectFile(MemoryBuffer *Object, MachOObject *MOO, | 31 MachOObjectFile::MachOObjectFile(MemoryBuffer *Object, MachOObject *MOO, |
| 32 error_code &ec) | 32 error_code &ec) |
| 33 : ObjectFile(Binary::isMachO, Object, ec), | 33 : ObjectFile(Binary::ID_MachO, Object, ec), |
| 34 MachOObj(MOO), | 34 MachOObj(MOO), |
| 35 RegisteredStringTable(std::numeric_limits<uint32_t>::max()) { | 35 RegisteredStringTable(std::numeric_limits<uint32_t>::max()) { |
| 36 DataRefImpl DRI; | 36 DataRefImpl DRI; |
| 37 DRI.d.a = DRI.d.b = 0; | 37 DRI.d.a = DRI.d.b = 0; |
| 38 moveToNextSection(DRI); | 38 moveToNextSection(DRI); |
| 39 uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands; | 39 uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands; |
| 40 while (DRI.d.a < LoadCommandCount) { | 40 while (DRI.d.a < LoadCommandCount) { |
| 41 Sections.push_back(DRI); | 41 Sections.push_back(DRI); |
| 42 DRI.d.b++; | 42 DRI.d.b++; |
| 43 moveToNextSection(DRI); | 43 moveToNextSection(DRI); |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 return Triple::ppc; | 1247 return Triple::ppc; |
| 1248 case llvm::MachO::CPUTypePowerPC64: | 1248 case llvm::MachO::CPUTypePowerPC64: |
| 1249 return Triple::ppc64; | 1249 return Triple::ppc64; |
| 1250 default: | 1250 default: |
| 1251 return Triple::UnknownArch; | 1251 return Triple::UnknownArch; |
| 1252 } | 1252 } |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 } // end namespace object | 1255 } // end namespace object |
| 1256 } // end namespace llvm | 1256 } // end namespace llvm |
| OLD | NEW |