Skip to content

fixup! Updated dump-C to use the new class #1743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/goto-instrument/dump_c_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ class dump_ct
copied_symbol_table(_ns.get_symbol_table()),
ns(copied_symbol_table),
language(factory()),
harness(include_harness)
harness(include_harness),
system_symbols(use_system_headers)
{
if(use_system_headers)
system_symbols=system_library_symbolst();
system_symbols.set_use_all_headers(use_all_headers);
}

Expand Down
13 changes: 4 additions & 9 deletions src/goto-programs/system_library_symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Author: Thomas Kiley
#include <util/type.h>
#include <sstream>

system_library_symbolst::system_library_symbolst():
system_library_symbolst::system_library_symbolst(bool init):
use_all_headers(false)
{
init_system_library_map();
if(init)
init_system_library_map();
}

/// To generate a map of header file names -> list of symbols The symbol names
Expand Down Expand Up @@ -220,13 +221,7 @@ void system_library_symbolst::init_system_library_map()
{
"__error", "__errno_location", "__errno"
};
add_to_system_library("errno.c", errno_syms);

std::list<irep_idt> noop_syms=
{
"__noop"
};
add_to_system_library("noop.c", noop_syms);
add_to_system_library("errno.h", errno_syms);

#if 0
// sys/types.h
Expand Down
8 changes: 7 additions & 1 deletion src/goto-programs/system_library_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Author: Thomas Kiley
#define CPROVER_GOTO_PROGRAMS_SYSTEM_LIBRARY_SYMBOLS_H

#include <list>
#include <map>
#include <set>
#include <string>
#include <util/irep.h>
Expand All @@ -24,7 +25,12 @@ class typet;
class system_library_symbolst
{
public:
system_library_symbolst();
explicit system_library_symbolst(bool init);

system_library_symbolst():
system_library_symbolst(true) // NOLINT(runtime/explicit)
{
}

bool is_symbol_internal_symbol(
const symbolt &symbol,
Expand Down