[PATCH] D39799: [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 08:05:14 PST 2017

ilya-biryukov added a comment.

I can see that `FixedCompilationDatabase` does not set a working directory. Is this something we may want to have for `compile_flags.txt` or one would need to resort to `compile_commands.json` to get this?
E.g., I'd find it useful to add includes with paths relative to `compile_flags.txt` by putting `-Iproject-dep/include` there.

Comment at: lib/Tooling/CompilationDatabase.cpp:322
+      llvm::line_iterator()};
+  return std::unique_ptr<FixedCompilationDatabase>(new FixedCompilationDatabase(
+      llvm::sys::path::parent_path(Path), std::move(Args)));
Maybe use `llvm:make_unique`?


More information about the cfe-commits mailing list