Fixed two leaks in the MC disassembler. The MC
authorSean Callanan <scallanan@apple.com>
Fri, 6 Apr 2012 18:21:09 +0000 (18:21 +0000)
committerSean Callanan <scallanan@apple.com>
Fri, 6 Apr 2012 18:21:09 +0000 (18:21 +0000)
commit55e79804226f1da02ec880c120671ff930e3dbe4
tree3fa559a95945b2de653bb1cc732b6abd9825a8b3
parent70fbea7c7598c8803a325ffca98069ff013a2994
Fixed two leaks in the MC disassembler.  The MC
disassembler requires a MCSubtargetInfo and a
MCInstrInfo to exist in order to initialize the
instruction printer and disassembler; however,
although the printer and disassembler keep
references to these objects they do not own them.
Previously, the MCSubtargetInfo and MCInstrInfo
objects were just leaked.

I have extended LLVMDisasmContext to own these
objects and delete them when it is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154192 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCDisassembler/Disassembler.cpp
lib/MC/MCDisassembler/Disassembler.h