]> granicus.if.org Git - llvm/commit
[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)
commit062224cde73b1fd9a1a343d300f0fec484fa1340
tree341284e8c28daa44e721ca2145278a31f6b943c2
parent15bfd0f9a039cdda59dc67f2c6b8c069235f80ea
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299596 91177308-0d34-0410-b5e6-96231b3b80d8
tools/bugpoint/Miscompilation.cpp