aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-14 00:39:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-14 00:39:22 +0000
commit836623420dbf5eb3a3facde2841179ded91ab55b (patch)
tree3649cdbec0fd013ebebc9ab9e23f1b9d285ed723
parentd2aaaf3a753e4264e880674ed087d8187f7796a4 (diff)
downloadexternal_llvm-836623420dbf5eb3a3facde2841179ded91ab55b.zip
external_llvm-836623420dbf5eb3a3facde2841179ded91ab55b.tar.gz
external_llvm-836623420dbf5eb3a3facde2841179ded91ab55b.tar.bz2
ObjectFile: Add support for mach-o-style dSYM companion files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/PathV1.h1
-rw-r--r--lib/Object/ObjectFile.cpp1
-rw-r--r--lib/Support/Path.cpp2
3 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h
index 024bb39..45165de 100644
--- a/include/llvm/Support/PathV1.h
+++ b/include/llvm/Support/PathV1.h
@@ -733,6 +733,7 @@ namespace sys {
Mach_O_DynamicLinker_FileType, ///< The Mach-O dynamic linker
Mach_O_Bundle_FileType, ///< Mach-O Bundle file
Mach_O_DynamicallyLinkedSharedLibStub_FileType, ///< Mach-O Shared lib stub
+ Mach_O_DSYMCompanion_FileType, ///< Mach-O dSYM companion file
COFF_FileType ///< COFF object file or lib
};
diff --git a/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp
index a7798df..69d8ed0 100644
--- a/lib/Object/ObjectFile.cpp
+++ b/lib/Object/ObjectFile.cpp
@@ -45,6 +45,7 @@ ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {
case sys::Mach_O_DynamicLinker_FileType:
case sys::Mach_O_Bundle_FileType:
case sys::Mach_O_DynamicallyLinkedSharedLibStub_FileType:
+ case sys::Mach_O_DSYMCompanion_FileType:
return createMachOObjectFile(Object);
case sys::COFF_FileType:
return createCOFFObjectFile(Object);
diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp
index 8fbaf2d..e5b7cd3 100644
--- a/lib/Support/Path.cpp
+++ b/lib/Support/Path.cpp
@@ -121,7 +121,7 @@ sys::IdentifyFileType(const char *magic, unsigned length) {
case 7: return Mach_O_DynamicLinker_FileType;
case 8: return Mach_O_Bundle_FileType;
case 9: return Mach_O_DynamicallyLinkedSharedLibStub_FileType;
- case 10: break; // FIXME: MH_DSYM companion file with only debug.
+ case 10: return Mach_O_DSYMCompanion_FileType;
}
break;
}