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