Skip to content

Commit 893d970

Browse files
authored
Merge pull request #3870 from tautschnig/symbol_exprt-concurrency
Use generic exprt to avoid deprecated default constructor of symbol_exprt [blocks: #3768]
2 parents 6fe6e9f + 0ee3175 commit 893d970

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: src/goto-instrument/concurrency.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Date: October 2012
1515

1616
#include <util/find_symbols.h>
1717
#include <util/invariant.h>
18+
#include <util/optional.h>
1819
#include <util/replace_symbol.h>
1920
#include <util/std_expr.h>
2021

@@ -58,14 +59,14 @@ class concurrency_instrumentationt
5859
{
5960
public:
6061
typet type;
61-
symbol_exprt array_symbol, w_index_symbol;
62+
optionalt<symbol_exprt> array_symbol, w_index_symbol;
6263
};
6364

6465
class thread_local_vart
6566
{
6667
public:
6768
typet type;
68-
symbol_exprt array_symbol;
69+
optionalt<symbol_exprt> array_symbol;
6970
};
7071

7172
typedef std::map<irep_idt, shared_vart> shared_varst;
@@ -101,7 +102,7 @@ void concurrency_instrumentationt::instrument(exprt &expr)
101102
// initialized anywhere
102103
const shared_vart &shared_var = v_it->second;
103104
const index_exprt new_expr(
104-
shared_var.array_symbol, shared_var.w_index_symbol);
105+
*shared_var.array_symbol, *shared_var.w_index_symbol);
105106

106107
replace_symbol.insert(s, new_expr);
107108
}

0 commit comments

Comments
 (0)