1 //===- LazyEmittingLayerTest.cpp - Unit tests for the lazy emitting layer -===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "llvm/ExecutionEngine/Orc/LazyEmittingLayer.h"
10 #include "llvm/ExecutionEngine/RuntimeDyld.h"
11 #include "gtest/gtest.h"
15 struct MockBaseLayer
{
16 typedef int ModuleHandleT
;
17 ModuleHandleT
addModule(llvm::orc::VModuleKey
,
18 std::shared_ptr
<llvm::Module
>) {
23 TEST(LazyEmittingLayerTest
, Empty
) {
25 llvm::orc::LazyEmittingLayer
<MockBaseLayer
> L(
26 llvm::AcknowledgeORCv1Deprecation
, M
);
28 L
.addModule(llvm::orc::VModuleKey(), std::unique_ptr
<llvm::Module
>()));