This is an archive of the discontinued LLVM Phabricator instance.

Findtypes -gmodules fix
ClosedPublic

Authored by jankratochvil on Apr 2 2020, 2:11 PM.

Details

Summary

A little fixup so that D77327 can be called NFC.

Diff Detail

Event Timeline

kwk added a comment.Apr 3 2020, 1:20 AM

Could you explain, why this was done please?

In D77336#1959094, @kwk wrote:

Could you explain, why this was done please?

As D77327 removes num_die_matches as now it is a callback so one cannot use it anymore after D77327. Exact replacement would be to count the number of times the callback was called. But that would keep it buggy, apparently the intention was to copy the condition above:

if (types.GetSize() >= max_matches)
  break;

So that if the iteration stopped because of too many matches we do not add even more matches in this Clang modules block downward.
It was implemented by: SymbolFileDWARF: Unconditionally scan through clang modules. NFCish

aprantl accepted this revision.Apr 3 2020, 2:15 PM

Thanks for catching this!

This revision is now accepted and ready to land.Apr 3 2020, 2:15 PM
This revision was automatically updated to reflect the committed changes.