#include "llvm/IR/PassManager.h"
#include "llvm/Analysis/CGSCCPassManager.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachinePassManager.h"
#include "llvm/IR/Analysis.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
usingnamespacellvm;
namespace {
class TestFunctionAnalysis : public AnalysisInfoMixin<TestFunctionAnalysis> { … };
AnalysisKey TestFunctionAnalysis::Key;
class TestMachineFunctionAnalysis
: public AnalysisInfoMixin<TestMachineFunctionAnalysis> { … };
AnalysisKey TestMachineFunctionAnalysis::Key;
struct TestMachineFunctionPass : public PassInfoMixin<TestMachineFunctionPass> { … };
struct TestMachineModulePass : public PassInfoMixin<TestMachineModulePass> { … };
struct ReportWarningPass : public PassInfoMixin<ReportWarningPass> { … };
std::unique_ptr<Module> parseIR(LLVMContext &Context, const char *IR) { … }
class PassManagerTest : public ::testing::Test { … };
TEST_F(PassManagerTest, Basic) { … }
TEST_F(PassManagerTest, DiagnosticHandler) { … }
}