[Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to the
authorLang Hames <lhames@gmail.com>
Mon, 2 Feb 2015 19:51:18 +0000 (19:51 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 2 Feb 2015 19:51:18 +0000 (19:51 +0000)
commit41367e252a806c1dfa36479d09643b3ac93a7263
tree99ceedb3bb968a2fd55ae9570caf2b98bb6fb1f4
parentd273a682a2bf498788e225a73499e504de652f83
[Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to the
ObjectLinkingLayer.

There are a two of overloads for addObject, one of which transfers ownership of
the underlying buffer to OrcMCJITReplacement. This commit makes the ownership
transfering version pass ownership down to the ObjectLinkingLayer in order to
prevent the issue described in r227778.

I think this commit will fix the sanitizer bot failures that necessitated the
removal of the load-object-a.ll regression test in r227785, so I'm reinstating
that test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227845 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
test/ExecutionEngine/OrcJIT/load-object-a.ll [new file with mode: 0644]