================
@@ -68,11 +71,35 @@ void LifetimeSafetyAnalysis::run() {
runLifetimeChecker(*LoanPropagation, *LiveOrigins, FactMgr, AC, Reporter);
}
+
+void collectLifetimeStats(AnalysisDeclContext &AC, OriginManager &OM,
+ LifetimeSafetyStats &Stats) {
+ if (!AC.getBody())
+ return;
+ Stmt *FunctionBody = AC.getBody();
+ OM.collectMissingOrigins(FunctionBody, Stats);
+}
} // namespace internal
+void printStats(const LifetimeSafetyStats &Stats) {
+ llvm::errs() << "\n*** LifetimeSafety Missing Origin Stats "
+ "(expression_type : count) :\n\n";
+ unsigned totalMissingOrigins = 0;
----------------
usx95 wrote:
nit: Variable names must follow UpperCamelCase
https://github.com/llvm/llvm-project/pull/166568
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits