Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.
authorFrederic Riss <friss@apple.com>
Wed, 3 Jun 2015 20:29:24 +0000 (20:29 +0000)
committerFrederic Riss <friss@apple.com>
Wed, 3 Jun 2015 20:29:24 +0000 (20:29 +0000)
commit696c93c900b4962ee5ba4abe6efdf7550b5e10c4
tree09301acbf664d11c8715a808d2169a063926dee4
parentb743320bb3385ed7da8a6cabdd7eed7b0c4b5fca
Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a binary.

With a couple more constructors that GCC thinks are necessary.

Original commit message:

[dsymutil] Accept a YAML debug map as input instead of a binary.

To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238959 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/dsymutil/X86/basic-linking-x86.test
test/tools/dsymutil/X86/basic-lto-linking-x86.test
tools/dsymutil/DebugMap.h
tools/dsymutil/MachODebugMapParser.cpp
tools/dsymutil/dsymutil.cpp
tools/dsymutil/dsymutil.h