[PATCH] D65974: Driver: Don't warn about assembler flags being unused when not assembling AND not using the integrated assembler

Douglas Yung via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 15:41:45 PDT 2019


dyung marked an inline comment as done.
dyung added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3559
     // CollectArgsForIntegratedAssembler().
-    if (TC.useIntegratedAs()) {
+    if (TC.useIntegratedAs() || isa<PreprocessJobAction>(JA)) {
       Args.ClaimAllArgs(options::OPT_mrelax_all);
----------------
thakis wrote:
> We shouldn't claim the OPT_m flags if we don't use integrated-as. Claiming Wa_COMMA and Xassembler makes sense to me.
If we do not, then one of the tests you included in this change will fail if a platform defaults to not using the integrated assembler. Should I remove this change and just update the test to explicitly set -fintegrated-as/-fno-integrated-as and test for the expected result?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65974/new/

https://reviews.llvm.org/D65974





More information about the cfe-commits mailing list