[Orc] In the CompileOnDemand layer, wrap module ownership in order to preserve
authorLang Hames <lhames@gmail.com>
Mon, 26 Oct 2015 06:37:04 +0000 (06:37 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 26 Oct 2015 06:37:04 +0000 (06:37 +0000)
commit88b1f94ab52399f98b631abfe6f69fcf3fe157c8
tree361b9d1913861188f96166b47b61eb1c6c00b2af
parentc08caf74139885b70eaf698b98dcc4f7a7389c45
[Orc] In the CompileOnDemand layer, wrap module ownership in order to preserve
the module pointer type passed in by the user.

The previous ownership scheme, where the user pointer was always moved into a
std::shared_ptr, breaks if the user passes in a raw pointer.

Discovered while working on the Orc C API, which should be landing shortly.
I expect to include a test-case with that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251273 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h