[PATCH] D51002: [Tooling] Allow -flto flags and filter out -Wa, flags

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 18:00:23 PDT 2018


chh added inline comments.


================
Comment at: lib/Tooling/CompilationDatabase.cpp:304
     if (Cmd.getSource().getKind() == driver::Action::AssembleJobClass ||
+        Cmd.getSource().getKind() == driver::Action::BackendJobClass ||
         Cmd.getSource().getKind() == driver::Action::CompileJobClass) {
----------------
srhines wrote:
> ioeric wrote:
> > It seems to me that `BackendJob` will always be preceded by a `CompileJob` (according to https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Driver.cpp#L3506), so at least of one job would be `CompileJobClass` here.  Not sure if I understood it correctly though. Would you mind clarify?
> Is the difference here because clang driver != clang-tidy driver?
The drivers are different but share some logic. This part is not used by clang driver.
For clang-tidy and clang-check, it looks like trying to skip Link job, but to handle Assemble, Compile, and Backend jobs.



https://reviews.llvm.org/D51002





More information about the llvm-commits mailing list