Basic support for parsing Mach-O universal binaries in LLVMObject library

llvm-svn: 184191
This commit is contained in:
Alexey Samsonov
2013-06-18 15:03:28 +00:00
parent 63d84f8149
commit e6388e622e
17 changed files with 312 additions and 4 deletions

View File

@@ -1297,8 +1297,8 @@ StringRef MachOObjectFile::getFileFormatName() const {
}
}
unsigned MachOObjectFile::getArch() const {
switch (getCPUType(this)) {
Triple::ArchType MachOObjectFile::getArch(uint32_t CPUType) {
switch (CPUType) {
case llvm::MachO::CPUTypeI386:
return Triple::x86;
case llvm::MachO::CPUTypeX86_64:
@@ -1314,6 +1314,10 @@ unsigned MachOObjectFile::getArch() const {
}
}
unsigned MachOObjectFile::getArch() const {
return getArch(getCPUType(this));
}
StringRef MachOObjectFile::getLoadName() const {
// TODO: Implement
report_fatal_error("get_load_name() unimplemented in MachOObjectFile");