static void runPass(PhaseTracker& tracker, size_t passIndex, bool isChpldoc) { PassInfo* info = &sPassList[passIndex]; // // The primary work for this pass // tracker.StartPhase(info->name, PhaseTracker::kPrimary); if (fPrintStatistics[0] != '\0' && passIndex > 0) printStatistics("clean"); (*(info->passFunction))(); // // Statistics and logging // if (fPrintStatistics[0] != '\0') printStatistics(info->name); log_writeLog(info->name, currentPassNo, info->logTag); considerExitingEndOfPass(); // // Clean up the global pointers to AST. If we're running chpldoc, // there's no real reason to run this step (and at the time of this // writing, it didn't work if we hadn't parsed all the 'use'd // modules. // if (!isChpldoc) { tracker.StartPhase(info->name, PhaseTracker::kCleanAst); cleanAst(); } // // An optional verify pass // tracker.StartPhase(info->name, PhaseTracker::kVerify); (*(info->checkFunction))(); // Run per-pass check function. if (printPasses == true || printPassesFile != 0) { tracker.ReportPass(); } }
static void runPass(PhaseTracker& tracker, size_t passIndex) { PassInfo* info = &sPassList[passIndex]; // // The primary work for this pass // tracker.StartPhase(info->name, PhaseTracker::kPrimary); if (fPrintStatistics[0] != '\0' && passIndex > 0) printStatistics("clean"); (*(info->passFunction))(); // // Statistics and logging // if (fPrintStatistics[0] != '\0') printStatistics(info->name); log_writeLog(info->name, currentPassNo, info->logTag); considerExitingEndOfPass(); // // Clean up the global pointers to AST // tracker.StartPhase(info->name, PhaseTracker::kCleanAst); cleanAst(); // // An optional verify pass // tracker.StartPhase(info->name, PhaseTracker::kVerify); (*(info->checkFunction))(); // Run per-pass check function. if (printPasses == true || printPassesFile != 0) { tracker.ReportPass(); } }