Skip to content

Commit 28950eb

Browse files
committed
Allow remove-internal_symbols to log and return
This commit allows remove_internal_symbols() to take a messaget object for logging, and to return a boolean to indicate success. This is in preparation for a commit where this function will emit debugging information.
1 parent 2c63234 commit 28950eb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/ansi-c/ansi_c_language.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ bool ansi_c_languaget::typecheck(
118118
return true;
119119
}
120120

121-
remove_internal_symbols(new_symbol_table);
121+
if(remove_internal_symbols(new_symbol_table, *this))
122+
return true;
122123

123124
if(linking(symbol_table, new_symbol_table, get_message_handler()))
124125
return true;

src/linking/remove_internal_symbols.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ static void get_symbols(
7171
/// http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
7272
/// on "extern inline"
7373
/// \param symbol_table: symbol table to clean up
74-
void remove_internal_symbols(
75-
symbol_tablet &symbol_table)
74+
bool remove_internal_symbols(symbol_tablet &symbol_table, messaget &log)
7675
{
7776
namespacet ns(symbol_table);
7877
find_symbols_sett exported;
@@ -165,4 +164,5 @@ void remove_internal_symbols(
165164
it++;
166165
}
167166
}
167+
return false;
168168
}

src/linking/remove_internal_symbols.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Author: Daniel Kroening
1212
#ifndef CPROVER_LINKING_REMOVE_INTERNAL_SYMBOLS_H
1313
#define CPROVER_LINKING_REMOVE_INTERNAL_SYMBOLS_H
1414

15-
void remove_internal_symbols(
16-
class symbol_tablet &symbol_table);
15+
#include <util/message.h>
16+
17+
bool remove_internal_symbols(class symbol_tablet &symbol_table, messaget &log);
1718

1819
#endif // CPROVER_LINKING_REMOVE_INTERNAL_SYMBOLS_H

0 commit comments

Comments
 (0)