| 35 | } |
| 36 | |
| 37 | void collectInvokeIndVariables ( const ProgramPtr & program, const TypeDeclPtr & inv, IndirectSources & sources ) { |
| 38 | das_hash_set<Function *> accessed; |
| 39 | program->library.foreach([&](Module * mod){ |
| 40 | ExpressionSources globSrc; |
| 41 | mod->functions.foreach([&](const FunctionPtr & gfunc){ |
| 42 | // not built-in, used, address taken, can potentially alias, compatible |
| 43 | if ( gfunc->isTemplate ) return; |
| 44 | if ( !gfunc->builtIn && gfunc->used && gfunc->addressTaken && !gfunc->aliasCMRES && isCompatibleFunction(gfunc, inv) ) { |
| 45 | appendIndVariables(gfunc, sources, accessed); |
| 46 | } |
| 47 | }); |
| 48 | return true; |
| 49 | },"*"); |
| 50 | } |
| 51 | |
| 52 | bool isCompatibleLambdaFunction ( const FunctionPtr & func, const TypeDeclPtr & inv ) { |
| 53 | if ( func->arguments.size()!=inv->argTypes.size()+1 ) return false; |
no test coverage detected