-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJSONFormatter.h
More file actions
28 lines (24 loc) · 824 Bytes
/
JSONFormatter.h
File metadata and controls
28 lines (24 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef JSONFORMATTER_H_
#define JSONFORMATTER_H_
#include <string>
#include <vector>
namespace FunctionFanout {
class JSONFormatter
{
public:
JSONFormatter(llvm::raw_ostream*);
virtual ~JSONFormatter();
virtual void BeginSourceFile();
virtual void EndSourceFile();
typedef std::vector<std::string> params_t;
virtual void AddDefinition(const std::string name, const std::string type, const params_t& params);
virtual void EndDefinition();
virtual void AddCallee(const std::string name, const std::string type, const params_t& params);
private:
llvm::raw_ostream& ost_;
unsigned num_of_definitions_;
unsigned num_of_callees_;
void FormatFunction(const std::string name, const std::string type, const params_t& params);
};
} /* namespace FunctionFanout */
#endif /* JSONFORMATTER_H_ */