Changes in directory llvm/lib/System:
Path.cpp updated: 1.24 -> 1.25 --- Log message: Hack to get sys::Path to recognize macho dylibs. --- Diffs of the changes: (+7 -4) Path.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/lib/System/Path.cpp diff -u llvm/lib/System/Path.cpp:1.24 llvm/lib/System/Path.cpp:1.25 --- llvm/lib/System/Path.cpp:1.24 Tue Apr 10 21:02:09 2007 +++ llvm/lib/System/Path.cpp Tue Apr 10 22:15:35 2007 @@ -68,12 +68,14 @@ } break; - case 0xCE: - case 0xCF: + case 0xCA: // This is complicated by an overlap with Java class files. // See the Mach-O section in /usr/share/file/magic for details. - if (magic[1] == char(0xFA) && magic[2] == char(0xED) && - magic[3] == char(0xFE)) + if (magic[1] == char(0xFE) && magic[2] == char(0xBA) && + magic[3] == char(0xBE)) { + return Mach_O_DynamicallyLinkedSharedLib_FileType; + + // FIXME: How does this work? if (length >= 14 && magic[13] == 0) switch (magic[12]) { default: break; @@ -87,6 +89,7 @@ case 8: return Mach_O_Bundle_FileType; case 9: return Mach_O_DynamicallyLinkedSharedLibStub_FileType; } + } break; case 0xF0: // PowerPC Windows _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits