[dsymutil] Implement support for universal mach-o object files.
authorFrederic Riss <friss@apple.com>
Fri, 24 Jul 2015 06:41:11 +0000 (06:41 +0000)
committerFrederic Riss <friss@apple.com>
Fri, 24 Jul 2015 06:41:11 +0000 (06:41 +0000)
commiteb85c8fb099ec65b47467d15b9ea1018ca201f6b
treecb3f6944d5153d5eedfc710456ea8d7dc30b0fc2
parent65f0abf275ccc1eb249bb12ce4ac826c9df37986
[dsymutil] Implement support for universal mach-o object files.

This patch allows llvm-dsymutil to read universal (aka fat) macho object
files and archives. The patch touches nearly everything in the BinaryHolder,
but it is fairly mechinical: the methods that returned MemoryBufferRefs or
ObjectFiles now return a vector of those, and the high-level access function
takes a triple argument to select the architecture.

There is no support yet for handling fat executables and thus no support for
writing fat object files.

llvm-svn: 243096
13 files changed:
llvm/test/tools/dsymutil/ARM/fat-arch-not-found.test [new file with mode: 0644]
llvm/test/tools/dsymutil/ARM/lit.local.cfg [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/fat-test.c [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/fat-test.o [new file with mode: 0644]
llvm/test/tools/dsymutil/Inputs/libfat-test.a [new file with mode: 0644]
llvm/test/tools/dsymutil/X86/fat-archive-input-i386.test [new file with mode: 0644]
llvm/test/tools/dsymutil/X86/fat-object-input-x86_64.test [new file with mode: 0644]
llvm/test/tools/dsymutil/X86/fat-object-input-x86_64h.test [new file with mode: 0644]
llvm/tools/dsymutil/BinaryHolder.cpp
llvm/tools/dsymutil/BinaryHolder.h
llvm/tools/dsymutil/DebugMap.cpp
llvm/tools/dsymutil/DwarfLinker.cpp
llvm/tools/dsymutil/MachODebugMapParser.cpp