[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)
commit35a514d200d1a9847e6f56b533d842cca12af97c
treee5658d9c4375a52165a01bfc495ed6c4edab70b5
parent4f33706b53c2a50ae5420fde9efc869545e8dbd5
[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.

llvm-svn: 227845
llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
llvm/test/ExecutionEngine/OrcJIT/load-object-a.ll [new file with mode: 0644]