mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Make it explicit that ExecutionEngine takes ownership of the modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -20,9 +20,10 @@ namespace {
|
||||
|
||||
class ExecutionEngineTest : public testing::Test {
|
||||
protected:
|
||||
ExecutionEngineTest()
|
||||
: M(new Module("<main>", getGlobalContext())), Error(""),
|
||||
Engine(EngineBuilder(M).setErrorStr(&Error).create()) {
|
||||
ExecutionEngineTest() {
|
||||
auto Owner = make_unique<Module>("<main>", getGlobalContext());
|
||||
M = Owner.get();
|
||||
Engine.reset(EngineBuilder(std::move(Owner)).setErrorStr(&Error).create());
|
||||
}
|
||||
|
||||
virtual void SetUp() {
|
||||
@ -35,9 +36,9 @@ protected:
|
||||
GlobalValue::ExternalLinkage, nullptr, Name);
|
||||
}
|
||||
|
||||
Module *const M;
|
||||
std::string Error;
|
||||
const std::unique_ptr<ExecutionEngine> Engine;
|
||||
Module *M; // Owned by ExecutionEngine.
|
||||
std::unique_ptr<ExecutionEngine> Engine;
|
||||
};
|
||||
|
||||
TEST_F(ExecutionEngineTest, ForwardGlobalMapping) {
|
||||
|
Reference in New Issue
Block a user