summaryrefslogtreecommitdiff
path: root/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
commit9c22f87b1374b06dc6c07f6e8047890e390bbe2d (patch)
tree4b4111e1ecfdffcfc137e357afdb764d72ea3696 /lib/Object/MachOObjectFile.cpp
parent79ac9c8402d4113d42ff2d713c7acdfa800d2397 (diff)
downloadllvm-9c22f87b1374b06dc6c07f6e8047890e390bbe2d.tar.gz
llvm-9c22f87b1374b06dc6c07f6e8047890e390bbe2d.tar.bz2
llvm-9c22f87b1374b06dc6c07f6e8047890e390bbe2d.tar.xz
Basic support for parsing Mach-O universal binaries in LLVMObject library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObjectFile.cpp')
-rw-r--r--lib/Object/MachOObjectFile.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp
index e62b5a4819..12090d6c30 100644
--- a/lib/Object/MachOObjectFile.cpp
+++ b/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");