Skip to content

Commit c24b820

Browse files
committed
Remove goto_convertt::lookup
This was a hardly used wrapper.
1 parent a816b26 commit c24b820

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

src/goto-programs/goto_convert.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ void goto_convertt::convert_decl(
668668

669669
const irep_idt &identifier=op0.get(ID_identifier);
670670

671-
const symbolt &symbol=lookup(identifier);
671+
const symbolt &symbol = ns.lookup(identifier);
672672

673673
if(symbol.is_static_lifetime ||
674674
symbol.type.id()==ID_code)
@@ -2067,17 +2067,6 @@ void goto_convertt::new_name(symbolt &symbol)
20672067
symbol_table.add(symbol);
20682068
}
20692069

2070-
const symbolt &goto_convertt::lookup(const irep_idt &identifier)
2071-
{
2072-
const symbolt *symbol;
2073-
if(ns.lookup(identifier, symbol))
2074-
{
2075-
error() << "failed to find symbol " << identifier << eom;
2076-
throw 0;
2077-
}
2078-
return *symbol;
2079-
}
2080-
20812070
void goto_convert(
20822071
const codet &code,
20832072
symbol_table_baset &symbol_table,

src/goto-programs/goto_convert_class.h

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class goto_convertt:public messaget
5757
// tools for symbols
5858
//
5959
void new_name(symbolt &symbol);
60-
const symbolt &lookup(const irep_idt &identifier);
6160

6261
symbolt &new_tmp_symbol(
6362
const typet &type,

src/goto-programs/goto_convert_side_effect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ void goto_convertt::remove_function_call(
377377
if(expr.op0().id()==ID_symbol)
378378
{
379379
const irep_idt &identifier=expr.op0().get(ID_identifier);
380-
const symbolt &symbol=lookup(identifier);
380+
const symbolt &symbol = ns.lookup(identifier);
381381

382382
std::string new_base_name=id2string(new_symbol.base_name);
383383

0 commit comments

Comments
 (0)