void CheckModule::check_functions(const llvm::Module *M){ check_pthread_create(M); check_pthread_join(M); check_pthread_self(M); check_pthread_exit(M); check_pthread_mutex_init(M); check_pthread_mutex_lock(M); check_pthread_mutex_trylock(M); check_pthread_mutex_unlock(M); check_pthread_mutex_destroy(M); check_pthread_cond_init(M); check_pthread_cond_signal(M); check_pthread_cond_broadcast(M); check_pthread_cond_wait(M); check_pthread_cond_destroy(M); check_malloc(M); check_calloc(M); check_nondet_int(M); check_assume(M); std::set<std::string> supported = {"pthread_create", "pthread_join", "pthread_self", "pthread_exit", "pthread_mutex_init", "pthread_mutex_lock", "pthread_mutex_trylock", "pthread_mutex_unlock", "pthread_mutex_destroy", "pthread_cond_init", "pthread_cond_signal", "pthread_cond_broadcast", "pthread_cond_wait", "pthread_cond_destroy"}; for(auto it = M->getFunctionList().begin(); it != M->getFunctionList().end(); ++it){ if(it->getName().startswith("pthread_") && supported.count(it->getName()) == 0){ Debug::warn("CheckModule:"+it->getName().str()) << "WARNING: Unsupported pthread function: " << it->getName() << "\n"; } } }
void CheckModule::check_assume(const llvm::Module *M){ check_assume(M,"__VERIFIER_assume"); }