Skip to content

Commit 2f8c47c

Browse files
committed
Support C++-20
1 parent 276afab commit 2f8c47c

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

include/kllvm/binary/ProofTraceParser.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ class LLVMFunctionEvent : public LLVMStepEvent {
103103
std::vector<LLVMEvent> arguments;
104104

105105
LLVMFunctionEvent(
106-
std::string const &_name, std::string const &_relativePosition)
107-
: name(_name)
108-
, relativePosition(_relativePosition)
109-
, arguments() { }
106+
std::string const &_name, std::string const &_relativePosition);
110107

111108
public:
112109
static sptr<LLVMFunctionEvent>
@@ -117,9 +114,9 @@ class LLVMFunctionEvent : public LLVMStepEvent {
117114

118115
std::string const &getName() const { return name; }
119116
std::string const &getRelativePosition() const { return relativePosition; }
120-
std::vector<LLVMEvent> const &getArguments() const { return arguments; }
117+
std::vector<LLVMEvent> const &getArguments() const;
121118

122-
void addArgument(LLVMEvent const &argument) { arguments.push_back(argument); }
119+
void addArgument(LLVMEvent const &argument);
123120

124121
virtual void print(std::ostream &Out, unsigned indent = 0u) const override;
125122
};
@@ -132,12 +129,7 @@ class LLVMHookEvent : public LLVMStepEvent {
132129
sptr<KOREPattern> korePattern;
133130
uint64_t patternLength;
134131

135-
LLVMHookEvent(std::string const &_name, std::string const &_relativePosition)
136-
: name(_name)
137-
, relativePosition(_relativePosition)
138-
, arguments()
139-
, korePattern(nullptr)
140-
, patternLength(0u) { }
132+
LLVMHookEvent(std::string const &_name, std::string const &_relativePosition);
141133

142134
public:
143135
static sptr<LLVMHookEvent>
@@ -155,7 +147,7 @@ class LLVMHookEvent : public LLVMStepEvent {
155147
patternLength = _patternLength;
156148
}
157149

158-
void addArgument(LLVMEvent const &argument) { arguments.push_back(argument); }
150+
void addArgument(LLVMEvent const &argument);
159151

160152
virtual void print(std::ostream &Out, unsigned indent = 0u) const override;
161153
};

lib/binary/ProofTraceParser.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ namespace kllvm {
66

77
constexpr auto indent_size = 2u;
88

9+
LLVMFunctionEvent::LLVMFunctionEvent(
10+
std::string const &_name, std::string const &_relativePosition)
11+
: name(_name)
12+
, relativePosition(_relativePosition)
13+
, arguments() { }
14+
15+
std::vector<LLVMEvent> const &LLVMFunctionEvent::getArguments() const {
16+
return arguments;
17+
}
18+
19+
void LLVMFunctionEvent::addArgument(LLVMEvent const &argument) {
20+
arguments.push_back(argument);
21+
}
22+
23+
LLVMHookEvent::LLVMHookEvent(
24+
std::string const &_name, std::string const &_relativePosition)
25+
: name(_name)
26+
, relativePosition(_relativePosition)
27+
, arguments()
28+
, korePattern(nullptr)
29+
, patternLength(0u) { }
30+
31+
void LLVMHookEvent::addArgument(LLVMEvent const &argument) {
32+
arguments.push_back(argument);
33+
}
34+
935
void LLVMRewriteEvent::printSubstitution(
1036
std::ostream &Out, unsigned indent) const {
1137
std::string Indent(indent * indent_size, ' ');

0 commit comments

Comments
 (0)