Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: lib/Object/MachOObjectFile.cpp

Issue 9617030: Distinguish between ELF 32/64, little/big endian, in the type system of Binary.h (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: x Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Object/COFFObjectFile.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « lib/Object/COFFObjectFile.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698