#include "llvm/ExecutionEngine/Orc/ReOptimizeLayer.h" #include "OrcTestCommon.h" #include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h" #include "llvm/ExecutionEngine/Orc/CompileUtils.h" #include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h" #include "llvm/ExecutionEngine/Orc/IRCompileLayer.h" #include "llvm/ExecutionEngine/Orc/IRPartitionLayer.h" #include "llvm/ExecutionEngine/Orc/IRTransformLayer.h" #include "llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h" #include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h" #include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h" #include "llvm/ExecutionEngine/Orc/ObjectTransformLayer.h" #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h" #include "llvm/IR/IRBuilder.h" #include "llvm/Support/CodeGen.h" #include "llvm/TargetParser/Host.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" usingnamespacellvm; usingnamespacellvm::orc; usingnamespacellvm::jitlink; class ReOptimizeLayerTest : public testing::Test { … }; static Function *createRetFunction(Module *M, StringRef Name, uint32_t ReturnCode) { … } TEST_F(ReOptimizeLayerTest, BasicReOptimization) { … }