Fix GetCallersForAllBaseFunctions found by romix

This commit is contained in:
Fangrui Song 2018-02-18 19:06:40 -08:00
parent 488f6cc962
commit 5164c4b2f6

View File

@ -274,10 +274,11 @@ std::vector<Use> GetCallersForAllBaseFunctions(QueryDatabase* db,
queue.pop(); queue.pop();
AddRange(&callers, func.uses); AddRange(&callers, func.uses);
if (def) if (const QueryFunc::Def* def1 = func.AnyDef()) {
EachWithGen<QueryFunc>(db->funcs, def->base, [&](QueryFunc& func1) { EachWithGen<QueryFunc>(db->funcs, def1->base, [&](QueryFunc& func1) {
queue.push(&func1); queue.push(&func1);
}); });
}
} }
return callers; return callers;