summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-06-18 15:03:28 +0000
committerAlexey Samsonov <samsonov@google.com>2013-06-18 15:03:28 +0000
commite6388e622e32f7c840d015b0710dcdde56af639e (patch)
tree59397d191d7fd2cbe3d7d0746fac7cb373842dc9 /llvm/lib/Object/MachOObjectFile.cpp
parent63d84f8149156eae20cf21e06c0212c14cf6ed44 (diff)
downloadbcm5719-llvm-e6388e622e32f7c840d015b0710dcdde56af639e.tar.gz
bcm5719-llvm-e6388e622e32f7c840d015b0710dcdde56af639e.zip
Basic support for parsing Mach-O universal binaries in LLVMObject library
llvm-svn: 184191
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index e62b5a48190..12090d6c300 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -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");
OpenPOWER on IntegriCloud