[llvm-objdump] Keep the memory buffer from the dSYM alive when using -g -dsym
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 31 Aug 2018 13:10:54 +0000 (13:10 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 31 Aug 2018 13:10:54 +0000 (13:10 +0000)
commit8e864be70aa9cb226a7f2cf1c23340fa05dc15e5
treed3925c7c7f64bbf7596528e2e4b4d8ab4d17cdcf
parentd81e3146e30b5b0bb2b5c740405305d58fd18bf3
[llvm-objdump] Keep the memory buffer from the dSYM alive when using -g -dsym

When using -g and -dsym, llvm-objdump opens the dsym file and keeps the
MachOObjectFile alive, while the memory buffer that the MachOObjectFile
was based on gets destroyed.

Differential Revision: https://reviews.llvm.org/D51365

llvm-svn: 341209
llvm/test/tools/llvm-objdump/X86/macho-disassembly-g-dsym.test [new file with mode: 0644]
llvm/tools/llvm-objdump/MachODump.cpp