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

Authored by chh on Aug 22 2018, 10:13 AM.


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

This change fixes the problem in https://bugs.llvm.org/show_bug.cgi?id=38332
by allowing driver::Action::BackendJobClass to run with the analyzer.
Otherwise, such jobs will look up the non-existing compilation database
and then run without flags.
Also filter out the -Wa,* flags that could be passed to and ignored
by the clang compiler. Clang-tidy gives warnings about unused -Wa,* flags.

Differential Revision: http://reviews.llvm.org/D51002

llvm-svn: 340421