return true if a variable in the list is volatile */
| 300 | |
| 301 | /* return true if a variable in the list is volatile */ |
| 302 | bool |
| 303 | VariableSelector::has_eligible_volatile_var(const vector<Variable *>& vars, const Type* type, const CVQualifiers* qfer, Effect::Access access, const CGContext& cg_context) |
| 304 | { |
| 305 | for (size_t i=0; i<vars.size(); i++) { |
| 306 | Variable* var = vars[i]; |
| 307 | if (type && !type->match(var->type, eFlexible)) { |
| 308 | continue; |
| 309 | } |
| 310 | if (qfer && !qfer->match_indirect(var->qfer)) { |
| 311 | continue; |
| 312 | } |
| 313 | int deref_level = var->type->get_indirect_level() - type->get_indirect_level(); |
| 314 | if (is_eligible_var(var, deref_level, access, cg_context) && var->is_volatile()) { |
| 315 | Bookkeeper::volatile_avail++; |
| 316 | return true; |
| 317 | } |
| 318 | } |
| 319 | return false; |
| 320 | } |
| 321 | |
| 322 | Variable * |
| 323 | VariableSelector::choose_ok_var(const vector<Variable *> &vars) |
nothing calls this directly
no test coverage detected