Skip to content

Commit 7bf4f74

Browse files
Move make_renamed implementation to cpp file
This avoids having to import std_expr in the header file
1 parent 8c6eabd commit 7bf4f74

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/goto-symex/renamed.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ Author: Romain Brenguier, [email protected]
1212
#include "renamed.h"
1313
#include <util/ssa_expr.h>
1414
#include <util/std_expr.h>
15+
16+
template <levelt level>
17+
renamedt<exprt, level> make_renamed(constant_exprt constant)
18+
{
19+
return renamedt<exprt, level>(std::move(constant));
20+
}
21+
22+
// Force template instantiations for the three levels
23+
template renamedt<exprt, L0> make_renamed(constant_exprt constant);
24+
template renamedt<exprt, L1> make_renamed(constant_exprt constant);
25+
template renamedt<exprt, L2> make_renamed(constant_exprt constant);
26+
1527
bool is_l1_renamed(const exprt &expr)
1628
{
1729
if(expr.id() == ID_symbol)

src/goto-symex/renamed.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ class renamedt : private underlyingt
8787
};
8888

8989
template <levelt level>
90-
renamedt<exprt, level> make_renamed(constant_exprt constant)
91-
{
92-
return renamedt<exprt, level>(std::move(constant));
93-
}
90+
renamedt<exprt, level> make_renamed(constant_exprt constant);
9491

9592
/// This permits replacing subexpressions of the renamed value, so long as
9693
/// each replacement is consistent with our current renaming level (for

0 commit comments

Comments
 (0)