Coverage Report

Created: 2023-10-30 17:15

/builds/2mk6rsew/0/parcoach/parcoach/src/aSSA/ShowPAInterResults.cpp
Line
Count
Source
1
#include "ShowPAInterResults.h"
2
#include "Utils.h"
3
4
#include "parcoach/CollListFunctionAnalysis.h"
5
#include "parcoach/Collectives.h"
6
#include "parcoach/Options.h"
7
8
#include "llvm/Support/WithColor.h"
9
10
using namespace llvm;
11
namespace parcoach {
12
13
1.76k
PreservedAnalyses ShowPAInterResult::run(Module &M, ModuleAnalysisManager &AM) {
14
1.76k
  auto &Res = AM.getResult<CollectiveAnalysis>(M);
15
1.76k
  if (Res->empty()) {
16
1.07k
    SMDiagnostic("", SourceMgr::DK_Remark, "No issues found.")
17
1.07k
        .print(ProgName, errs(), true, true);
18
1.07k
  }
19
2.41k
  for (auto const &[_, W] : *Res) {
20
2.41k
    SMDiagnostic(W.Where.Filename, SourceMgr::DK_Warning, W.toString())
21
2.41k
        .print(ProgName, errs(), true, true);
22
2.41k
  }
23
1.76k
  return PreservedAnalyses::all();
24
1.76k
}
25
} // namespace parcoach