ClearBlue
include
Checker
Sailfish
SailfishRetValSummaryBuilder.h
1
//
2
// Created by yongchao on 12/25/22.
3
//
4
5
#ifndef CLEARBLUE_SAILFISHRETVALSUMMARYBUILDER_H
6
#define CLEARBLUE_SAILFISHRETVALSUMMARYBUILDER_H
7
8
#include "Checker/PSA/TraceSummary.h"
9
#include "Checker/Sailfish/SailfishFunctionChecker.h"
10
11
using namespace
llvm;
12
13
class
SailfishRetValSummaryBuilder
:
public
SailfishFunctionChecker
{
14
private
:
15
time_t start_time;
16
17
public
:
18
SailfishRetValSummaryBuilder
(
SailfishChecker
*P, Function *F)
19
:
SailfishFunctionChecker
(P, F) {
20
time(&start_time);
21
}
22
virtual
~
SailfishRetValSummaryBuilder
() {
23
time_t curr_time;
24
time(&curr_time);
25
PTL->Statistics.emplace_back(
26
F->getName(),
"RetVal"
,
27
(SEG->getCommonReturn() ==
nullptr
? 0 : 1) + SEG->getNumPseudoReturn(),
28
Smry->RetValSummaryMap.size(), (
size_t
)difftime(curr_time, start_time));
29
}
30
31
virtual
void
run()
override
;
32
33
virtual
void
storeSummary(SummaryBase *R)
override
;
34
};
35
36
#endif // CLEARBLUE_SAILFISHRETVALSUMMARYBUILDER_H
SailfishChecker
Definition:
SailfishChecker.h:42
SailfishFunctionChecker
Definition:
SailfishFunctionChecker.h:22
SailfishRetValSummaryBuilder
Definition:
SailfishRetValSummaryBuilder.h:13
Generated by
1.8.17