[PATCH] D102812: [clang] Don't pass multiple backend options if mixing -mimplicit-it and -Wa,-mimplicit-it

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 23:52:41 PDT 2021


mstorsjo added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2428
   for (const Arg *A :
        Args.filtered(options::OPT_Wa_COMMA, options::OPT_Xassembler)) {
     A->claim();
----------------
We could also just add `options::OPT_mimplicit_it_EQ` into this loop here, and we'd know for certain which value was set last on the command line, so there wouldn't be any ambiguity and we could remove the error case altogether. (The fact that you can have several differing options and the last one takes effect seems to be the intended behaviour from D96285.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102812



More information about the cfe-commits mailing list