------------------------------------------------------------------------------ New PM interface for the printer pass ------------------------------------------------------------------------------
| 44 | // New PM interface for the printer pass |
| 45 | //------------------------------------------------------------------------------ |
| 46 | class OpcodeCounterPrinter : public llvm::PassInfoMixin<OpcodeCounterPrinter> { |
| 47 | public: |
| 48 | explicit OpcodeCounterPrinter(llvm::raw_ostream &OutS) : OS(OutS) {} |
| 49 | llvm::PreservedAnalyses run(llvm::Function &Func, |
| 50 | llvm::FunctionAnalysisManager &FAM); |
| 51 | // Part of the official API: |
| 52 | // https://llvm.org/docs/WritingAnLLVMNewPMPass.html#required-passes |
| 53 | static bool isRequired() { return true; } |
| 54 | |
| 55 | private: |
| 56 | llvm::raw_ostream &OS; |
| 57 | }; |
| 58 | #endif |
no outgoing calls
no test coverage detected