summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Archive.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2014-11-12 01:37:45 +0000
committerNick Kledzik <kledzik@apple.com>2014-11-12 01:37:45 +0000
commitf44dbda5427bcbdcb7f2c22c57bff8f901ff515a (patch)
tree66988d180aabd49b50fd4e271b92f08499e21fcc /llvm/lib/Object/Archive.cpp
parent35a12a85a174f9e61dbe34048b6370a6aeb1a3d5 (diff)
downloadbcm5719-llvm-f44dbda5427bcbdcb7f2c22c57bff8f901ff515a.tar.gz
bcm5719-llvm-f44dbda5427bcbdcb7f2c22c57bff8f901ff515a.zip
Object, support both mach-o archive t.o.c file names
For historical reasons archives on mach-o have two possible names for the file containing the table of contents for the archive: "__.SYMDEF SORTED" and "__.SYMDEF". But the libObject archive reader only supported the former. This patch fixes llvm::object::Archive to support both names. llvm-svn: 221747
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
-rw-r--r--llvm/lib/Object/Archive.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp
index 070fe812eec..d169dbee46e 100644
--- a/llvm/lib/Object/Archive.cpp
+++ b/llvm/lib/Object/Archive.cpp
@@ -240,7 +240,7 @@ Archive::Archive(MemoryBufferRef Source, std::error_code &ec)
if (ec)
return;
Name = NameOrErr.get();
- if (Name == "__.SYMDEF SORTED") {
+ if (Name == "__.SYMDEF SORTED" || Name == "__.SYMDEF") {
SymbolTable = i;
++i;
}
OpenPOWER on IntegriCloud