//===------ OrcTestCommon.h - Utilities for Orc Unit Tests ------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Common utilities for the Orc unit tests. // //===----------------------------------------------------------------------===// #ifndef LLVM_UNITTESTS_EXECUTIONENGINE_ORC_ORCTESTCOMMON_H #define LLVM_UNITTESTS_EXECUTIONENGINE_ORC_ORCTESTCOMMON_H #include "llvm/ExecutionEngine/JITSymbol.h" #include "llvm/ExecutionEngine/Orc/Core.h" #include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h" #include "llvm/ExecutionEngine/Orc/IndirectionUtils.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/TargetSelect.h" #include "gtest/gtest.h" #include <memory> namespace llvm { namespace orc { // CoreAPIsStandardTest that saves a bunch of boilerplate by providing the // following: // // (1) ES -- An ExecutionSession // (2) Foo, Bar, Baz, Qux -- SymbolStringPtrs for strings "foo", "bar", "baz", // and "qux" respectively. // (3) FooAddr, BarAddr, BazAddr, QuxAddr -- Dummy addresses. Guaranteed // distinct and non-null. // (4) FooSym, BarSym, BazSym, QuxSym -- JITEvaluatedSymbols with FooAddr, // BarAddr, BazAddr, and QuxAddr respectively. All with default strong, // linkage and non-hidden visibility. // (5) V -- A JITDylib associated with ES. class CoreAPIsBasedStandardTest : public testing::Test { … }; } // end namespace orc class OrcNativeTarget { … }; class SimpleMaterializationUnit : public orc::MaterializationUnit { … }; class ModuleBuilder { … }; // Dummy struct type. struct DummyStruct { … }; inline StructType *getDummyStructTy(LLVMContext &Context) { … } } // namespace llvm #endif