SixWeining accepted this revision.
SixWeining added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
================
Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:64
+ // conflicts with the higher-priority settings implied by -m*-float.
+ if (!ImpliedABI.empty()) {
+ if (const Arg *A = Args.getLastArg(options::OPT_mabi_EQ)) {
----------------
Seems that this condition is always `true`.
================
Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:85
// Select abi based on -mfpu=xx.
- if (const Arg *A = Args.getLastArg(options::OPT_mfpu_EQ)) {
- StringRef FPU = A->getValue();
- if (FPU == "64")
- return IsLA32 ? "ilp32d" : "lp64d";
- if (FPU == "32")
- return IsLA32 ? "ilp32f" : "lp64f";
- if (FPU == "0" || FPU == "none")
- return IsLA32 ? "ilp32s" : "lp64s";
- D.Diag(diag::err_drv_loongarch_invalid_mfpu_EQ) << FPU;
+ switch (FPU) {
+ case 64:
----------------
Without `default`, there may be compiling warning?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153707/new/
https://reviews.llvm.org/D153707
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits