From: Benjamin Kramer Date: Wed, 14 Sep 2011 00:39:22 +0000 (+0000) Subject: ObjectFile: Add support for mach-o-style dSYM companion files. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=836623420dbf5eb3a3facde2841179ded91ab55b;p=oota-llvm.git 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 --- diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h index 024bb39cedc..45165ded619 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 a7798df33fe..69d8ed0e5e9 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 8fbaf2d42bf..e5b7cd3bfbc 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; }