You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
984 B

//===- LazyEmittingLayerTest.cpp - Unit tests for the lazy emitting layer -===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "llvm/ExecutionEngine/Orc/LazyEmittingLayer.h"
#include "gtest/gtest.h"
namespace {
struct MockBaseLayer {
typedef int ModuleSetHandleT;
ModuleSetHandleT addModuleSet(
std::list<std::unique_ptr<llvm::Module>>,
std::unique_ptr<llvm::RuntimeDyld::MemoryManager> MemMgr,
std::unique_ptr<llvm::RuntimeDyld::SymbolResolver> Resolver) {
EXPECT_FALSE(MemMgr);
return 42;
}
};
TEST(LazyEmittingLayerTest, Empty) {
MockBaseLayer M;
llvm::orc::LazyEmittingLayer<MockBaseLayer> L(M);
L.addModuleSet(std::list<std::unique_ptr<llvm::Module>>(), nullptr, nullptr);
}
}