1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include "loweringpass.h" using namespace llvm; char LoweringPass::ID = 0; RegisterPass<LoweringPass> X("lowering", "Lowering Pass"); LoweringPass::LoweringPass() : ModulePass((intptr_t)&ID) { } bool LoweringPass::runOnModule(Module &m) { llvm::cerr << "Hello: " << m.getModuleIdentifier() << "\n"; return false; }