[PATCH] D44684: [mips] Improve handling of -fno-[pic/PIC] option
Simon Dardis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 26 06:47:50 PDT 2018
sdardis added inline comments.
================
Comment at: include/clang/Basic/DiagnosticDriverKinds.td:340
+ "ignoring '%0' option as it cannot be used with "
+ "explicit use of -mabicalls and the N64 ABI">,
InGroup<OptionIgnored>;
----------------
Use the %select{optionA|optionB|..|optionZ}$NUM operator here like:
"cannot be used with the %select{explicit|implicit}1 usage of -mabicalls and the N64 ABI"
Which eliminates the need for two separate warnings.
================
Comment at: lib/Driver/ToolChains/Arch/Mips.cpp:242-250
+ if (!ABICallsArg) {
+ D.Diag(diag::warn_drv_unsupported_pic_with_implicit_mabicalls)
+ << LastPICArg->getAsString(Args);
+ NonPIC = false;
+ } else if (UseAbiCalls) {
+ D.Diag(diag::warn_drv_unsupported_pic_with_explicit_mabicalls)
+ << LastPICArg->getAsString(Args);
----------------
Then all of this can be simplified.
Repository:
rL LLVM
https://reviews.llvm.org/D44684
More information about the cfe-commits
mailing list