Skip to content
Snippets Groups Projects
Commit f007a3ae authored by Zuzana Baranová's avatar Zuzana Baranová
Browse files

CC: Move whitelisted() functions into an anonymous namespace in link.hpp.

parent 6a7e6fdc
No related branches found
No related tags found
No related merge requests found
...@@ -39,22 +39,25 @@ namespace divine::cc ...@@ -39,22 +39,25 @@ namespace divine::cc
{ {
using PairedFiles = std::vector< std::pair< std::string, std::string > >; using PairedFiles = std::vector< std::pair< std::string, std::string > >;
bool whitelisted( llvm::Function &f ) namespace
{ {
using brick::string::startsWith; bool whitelisted( llvm::Function &f )
using vm::xg::hypercall; {
using brick::string::startsWith;
auto n = f.getName(); using vm::xg::hypercall;
return hypercall( &f ) != vm::lx::NotHypercall ||
startsWith( n, "__dios_" ) || auto n = f.getName();
startsWith( n, "_ZN6__dios" ) || return hypercall( &f ) != vm::lx::NotHypercall ||
startsWith( n, "_Unwind_" ) || startsWith( n, "__dios_" ) ||
n == "setjmp" || n == "longjmp"; startsWith( n, "_ZN6__dios" ) ||
} startsWith( n, "_Unwind_" ) ||
n == "setjmp" || n == "longjmp";
}
bool whitelisted( llvm::GlobalVariable &gv ) bool whitelisted( llvm::GlobalVariable &gv )
{ {
return brick::string::startsWith( gv.getName(), "__md_" ); return brick::string::startsWith( gv.getName(), "__md_" );
}
} }
template < typename Driver, bool link_dios > template < typename Driver, bool link_dios >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment