initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
}
- virtual bool runOnFunction(Function &F) {
+ bool runOnFunction(Function &F) override {
F.viewCFG();
return false;
}
- void print(raw_ostream &OS, const Module* = 0) const {}
+ void print(raw_ostream &OS, const Module* = 0) const override {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
};
initializeCFGOnlyViewerPass(*PassRegistry::getPassRegistry());
}
- virtual bool runOnFunction(Function &F) {
+ bool runOnFunction(Function &F) override {
F.viewCFGOnly();
return false;
}
- void print(raw_ostream &OS, const Module* = 0) const {}
+ void print(raw_ostream &OS, const Module* = 0) const override {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
};
initializeCFGPrinterPass(*PassRegistry::getPassRegistry());
}
- virtual bool runOnFunction(Function &F) {
+ bool runOnFunction(Function &F) override {
std::string Filename = "cfg." + F.getName().str() + ".dot";
errs() << "Writing '" << Filename << "'...";
return false;
}
- void print(raw_ostream &OS, const Module* = 0) const {}
+ void print(raw_ostream &OS, const Module* = 0) const override {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
};
CFGOnlyPrinter() : FunctionPass(ID) {
initializeCFGOnlyPrinterPass(*PassRegistry::getPassRegistry());
}
-
- virtual bool runOnFunction(Function &F) {
+
+ bool runOnFunction(Function &F) override {
std::string Filename = "cfg." + F.getName().str() + ".dot";
errs() << "Writing '" << Filename << "'...";
errs() << "\n";
return false;
}
- void print(raw_ostream &OS, const Module* = 0) const {}
+ void print(raw_ostream &OS, const Module* = 0) const override {}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesAll();
}
};