diff --git a/divine/cc/link.hpp b/divine/cc/link.hpp index 473600aac11baa2cb8c7fcddd980364d21144c3a..4cbbaedac4b24ce026e304267242b53cdb6d85e6 100644 --- a/divine/cc/link.hpp +++ b/divine/cc/link.hpp @@ -39,22 +39,25 @@ namespace divine::cc { using PairedFiles = std::vector< std::pair< std::string, std::string > >; - bool whitelisted( llvm::Function &f ) + namespace { - using brick::string::startsWith; - using vm::xg::hypercall; - - auto n = f.getName(); - return hypercall( &f ) != vm::lx::NotHypercall || - startsWith( n, "__dios_" ) || - startsWith( n, "_ZN6__dios" ) || - startsWith( n, "_Unwind_" ) || - n == "setjmp" || n == "longjmp"; - } + bool whitelisted( llvm::Function &f ) + { + using brick::string::startsWith; + using vm::xg::hypercall; + + auto n = f.getName(); + return hypercall( &f ) != vm::lx::NotHypercall || + startsWith( n, "__dios_" ) || + startsWith( n, "_ZN6__dios" ) || + startsWith( n, "_Unwind_" ) || + n == "setjmp" || n == "longjmp"; + } - bool whitelisted( llvm::GlobalVariable &gv ) - { - return brick::string::startsWith( gv.getName(), "__md_" ); + bool whitelisted( llvm::GlobalVariable &gv ) + { + return brick::string::startsWith( gv.getName(), "__md_" ); + } } template < typename Driver, bool link_dios >