[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:44:47 PDT 2021
mstorsjo added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2371
+ return Value == "always" || Value == "never" || Value == "arm" ||
+ Value == "thumb";
+}
----------------
I guess this could be a `StringSwitch<bool>` too if you think that's nicer.
================
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"
----------------
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.
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