Skip to content

Commit 645f917

Browse files
Move make_renamed implementation to cpp file
This avoids having to import std_expr in the header file
1 parent fe79106 commit 645f917

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
@@ -13,6 +13,18 @@ Author: Romain Brenguier, [email protected]
1313
#include <util/ssa_expr.h>
1414
#include "renamed.h"
1515

16+
17+
template <levelt level>
18+
renamedt<exprt, level> make_renamed(constant_exprt constant)
19+
{
20+
return renamedt<exprt, level>(std::move(constant));
21+
}
22+
23+
// Force template instantiations for the three levels
24+
template renamedt<exprt, L0> make_renamed(constant_exprt constant);
25+
template renamedt<exprt, L1> make_renamed(constant_exprt constant);
26+
template renamedt<exprt, L2> make_renamed(constant_exprt constant);
27+
1628
bool is_l1_renamed(const exprt &expr)
1729
{
1830
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)