[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-16 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1e25ff84d89e: [clang][deps] Fix traversal of precompiled dependencies (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.or

[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, with another comment inline (up to you whether to do something with it). Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:92 + //

[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Fair enough, iterative implementation will be better. I simplified it a bit by using the in-out parameter `ModuleFiles` to keep track of visited files. I also switched to using `SmallVector` for the newly discovered (not-yet-visited) imports, which allows using the

[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 415380. jansvoboda11 added a comment. Throw away recursive implementation, add reproducer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121533/new/ https://reviews.llvm.org/D121533 Files: clang/lib/Tool

[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I'm not a big fan of moving to the recursive call. Creating a separate `StringMap` for each iteration seems awfully wasteful. I'd prefer fixing the iterative algorithm so that it's correct and easy to verify. This can be done with a stack that points at the stable po

[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies

2022-03-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The code for traversing precompiled dependencies is somewhat