[Bugpoint] Use `unique_ptr` correctly.
authorBryant Wong <llvm-commits@xorshift.org>
Wed, 5 Apr 2017 22:23:48 +0000 (22:23 +0000)
committerBryant Wong <llvm-commits@xorshift.org>
Wed, 5 Apr 2017 22:23:48 +0000 (22:23 +0000)
commit77b14505aa6147d6160cd133d26433901beff6c2
tree9ba80e6eb808d73d5a798b3d5db0eaafb4f721af
parent0ce388bebb915f93a767167a70a32c5f9d21a8f6
[Bugpoint] Use `unique_ptr` correctly.

Moving Modules into `testMergedProgram` is incorrect (and causes segmentation
faults) since all callers expect to retain ownership. This is evidenced by the
later calls to `unique_ptr<Module>::get` in the same function.

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

llvm-svn: 299596
llvm/tools/bugpoint/Miscompilation.cpp