[PATCH] D121533: [clang][deps] Fix traversal of precompiled dependencies
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 15 04:03:18 PDT 2022
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 suggested `pop_back_val` and avoids using (potentially dangling) iterator.
The test case is a bit unwieldy, since the old implementation only failed when the `StringMap` got rehashed (with 16 entries).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121533/new/
https://reviews.llvm.org/D121533
More information about the cfe-commits
mailing list