MaskRay added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2369 -static bool AddARMImplicitITArgs(const ArgList &Args, ArgStringList &CmdArgs, +static bool CheckARMImplicitITArg(StringRef Value) { + return Value == "always" || Value == "never" || Value == "arm" || ---------------- Use `functionName` for new functions. ================ Comment at: clang/test/Driver/arm-target-as-mimplicit-it.s:39 // ALWAYS: "-mllvm" "-arm-implicit-it=always" +// ALWAYS-NOT: "-arm-implicit-it={{.*}}" // NEVER: "-mllvm" "-arm-implicit-it=never" ---------------- mstorsjo wrote: > DavidSpickett wrote: > > mstorsjo wrote: > > > This pattern wouldn't detct if there's e.g. `-arm-implicit-it=never > > > -arm-implicit-it=always`, but I added test cases that pass > > > `-Wa,-mimplicit-it=always` twice, where this check should be able to > > > verify that we only output it once. > > Could you do: > > ``` > > // ALWAYS-NOT: "-mllvm" "-arm-implicit-it=never" > > // ALWAYS: "-mllvm" "-arm-implicit-it=always" > > ``` > > > > Not sure if doing the NOT moves the check forward to beyond where the > > always would be. > Thanks, I think that could work to further guard against that case. The NOT pattern can omit the value to catch more cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102812/new/ https://reviews.llvm.org/D102812 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits