Skip to content

Commit a69d950

Browse files
smowtonpeterschrammel
authored andcommitted
Add namespace-utils to utils Makefile
1 parent 229bd5b commit a69d950

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/util/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ SRC = arith_tools.cpp base_type.cpp cmdline.cpp config.cpp symbol_table.cpp \
2222
irep_ids.cpp byte_operators.cpp string2int.cpp file_util.cpp \
2323
memory_info.cpp pipe_stream.cpp irep_hash.cpp endianness_map.cpp \
2424
ssa_expr.cpp json_irep.cpp json_expr.cpp \
25-
string_utils.cpp parameter_indices.cpp
25+
string_utils.cpp parameter_indices.cpp namespace_utils.cpp
2626

2727
INCLUDES= -I ..
2828

src/util/namespace_utils.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ class namespace_utils_baset
2525
virtual ~namespace_utils_baset()
2626
{
2727
}
28-
28+
2929
const symbolt &lookup(const irep_idt &name) const
3030
{
3131
const symbolt *symbol;
3232
if(lookup(name, symbol))
3333
throw "identifier "+id2string(name)+" not found";
3434
return *symbol;
3535
}
36-
36+
3737
const symbolt &lookup(const symbol_exprt &symbol_expr) const
3838
{
3939
const symbolt *symbol;
4040
if(lookup(symbol_expr.get_identifier(), symbol))
4141
throw "identifier "+id2string(symbol_expr.get_identifier())+" not found";
4242
return *symbol;
4343
}
44-
44+
4545
bool lookup(const irep_idt &name, const symbolt *&symbol) const
4646
{
4747
return ns().lookup(name, symbol);
@@ -67,7 +67,7 @@ class namespace_utils_baset
6767
{
6868
::base_type(type, ns());
6969
}
70-
70+
7171
void base_type(exprt &expr)
7272
{
7373
::base_type(expr, ns());
@@ -77,14 +77,14 @@ class namespace_utils_baset
7777

7878
private:
7979
bool does_symbol_match(
80-
const exprt& lvalue,
80+
const exprt &lvalue,
8181
std::function<bool(symbolt)> predicate) const;
8282

8383
public:
84-
bool is_parameter(const exprt& lvalue) const;
85-
bool is_static(const exprt& lvalue) const;
86-
bool is_auxiliary_variable(const exprt& lvalue) const;
87-
bool is_return_value_auxiliary(const exprt& lvalue) const;
84+
bool is_parameter(const exprt &lvalue) const;
85+
bool is_static(const exprt &lvalue) const;
86+
bool is_auxiliary_variable(const exprt &lvalue) const;
87+
bool is_return_value_auxiliary(const exprt &lvalue) const;
8888

8989
bool type_eq(const typet &type1, const typet &type2)
9090
{
@@ -99,12 +99,12 @@ class namespace_utils_baset
9999
protected:
100100
virtual const namespacet &ns() const=0;
101101
};
102-
102+
103103
class namespace_utilst:public virtual namespace_utils_baset
104104
{
105105
public:
106106
namespace_utilst(const namespacet &_ns):__ns(_ns){}
107-
107+
108108
protected:
109109
const namespacet &__ns;
110110

@@ -113,5 +113,5 @@ class namespace_utilst:public virtual namespace_utils_baset
113113
return __ns;
114114
}
115115
};
116-
116+
117117
#endif

0 commit comments

Comments
 (0)