[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 07:54:57 PDT 2018
sammccall added inline comments.
================
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:115
+ for (auto F : getAllFiles())
+ Paths.emplace_back(Strings.save(F), 0);
+ finalizeIndex();
----------------
ilya-biryukov wrote:
> This class seems to do two somewhat orthogonal things:
> - build and query the index structure for the paths,
> - handle queries to inner CDB and patch the compile commands for other files accordingly.
>
> Maybe we could extract the code that handles the index into a separate class?
I split out FilenameIndex, which just does the filename->filename mapping. The CompilationDatabase implementation now only contains the interface methods and adjust().
Repository:
rC Clang
https://reviews.llvm.org/D45006
More information about the cfe-commits
mailing list