From f007a3ae0d76527d8f5f979d5b38ba7c7b073c10 Mon Sep 17 00:00:00 2001 From: Zuzana Baranova <xbaranov@fi.muni.cz> Date: Wed, 19 Jun 2019 23:24:37 +0000 Subject: [PATCH] CC: Move whitelisted() functions into an anonymous namespace in link.hpp. --- divine/cc/link.hpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/divine/cc/link.hpp b/divine/cc/link.hpp index 473600aac..4cbbaedac 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 > -- GitLab