#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Pass.h"
#include "llvm/PassRegistry.h"
#include <gtest/gtest.h>
#include <llvm/ADT/SmallString.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/PassInstrumentation.h>
#include <llvm/IR/PassManager.h>
#include <llvm/IR/PassTimingInfo.h>
#include <llvm/Support/raw_ostream.h>
usingnamespacellvm;
namespace llvm {
void initializePass1Pass(PassRegistry &);
void initializePass2Pass(PassRegistry &);
namespace {
struct Pass1 : public ModulePass { … };
char Pass1::ID;
struct Pass2 : public ModulePass { … };
char Pass2::ID;
}
}
INITIALIZE_PASS(…)
INITIALIZE_PASS(…)
namespace {
TEST(TimePassesTest, LegacyCustomOut) { … }
class MyPass1 : public PassInfoMixin<MyPass1> { … };
class MyPass2 : public PassInfoMixin<MyPass2> { … };
TEST(TimePassesTest, CustomOut) { … }
}