File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,11 @@ Function: coverage_goalst::is_existing_goal
125
125
126
126
\*******************************************************************/
127
127
128
- bool coverage_goalst::is_existing_goal (const char * goal )
128
+ bool coverage_goalst::is_existing_goal (source_locationt source_location )
129
129
{
130
130
std::vector<std::string>::iterator it;
131
- it = find (existing_goals.begin (), existing_goals.end (), goal);
131
+ it = find (existing_goals.begin (), existing_goals.end (),
132
+ source_location.get_line ().c_str ());
132
133
133
134
if (it == existing_goals.end ())
134
135
return true ;
@@ -1219,7 +1220,7 @@ void instrument_cover_goals(
1219
1220
basic_blocks.source_location_map [block_nr];
1220
1221
1221
1222
// check whether the current goal already exists
1222
- if (goals.is_existing_goal (source_location. get_line (). c_str () ) &&
1223
+ if (goals.is_existing_goal (source_location) &&
1223
1224
!source_location.get_file ().empty () &&
1224
1225
source_location.get_file ()[0 ]!=' <' )
1225
1226
{
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class coverage_goalst
17
17
{
18
18
public:
19
19
void set_goals (std::string goal);
20
- bool is_existing_goal (const char * goal );
20
+ bool is_existing_goal (source_locationt source_location );
21
21
22
22
private:
23
23
std::vector<std::string> existing_goals;
You can’t perform that action at this time.
0 commit comments