Skip to content

Commit 0460418

Browse files
authored
[clang][driver][NFC] Remove else after return (#131182)
1 parent 681b241 commit 0460418

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

clang/lib/Driver/ToolChains/Arch/RISCV.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ std::string riscv::getRISCVArch(const llvm::opt::ArgList &Args,
318318

319319
if (MABI.equals_insensitive("ilp32e"))
320320
return "rv32e";
321-
else if (MABI.equals_insensitive("lp64e"))
321+
if (MABI.equals_insensitive("lp64e"))
322322
return "rv64e";
323-
else if (MABI.starts_with_insensitive("ilp32"))
323+
if (MABI.starts_with_insensitive("ilp32"))
324324
return "rv32imafdc";
325-
else if (MABI.starts_with_insensitive("lp64")) {
325+
if (MABI.starts_with_insensitive("lp64")) {
326326
if (Triple.isAndroid())
327327
return "rv64imafdcv_zba_zbb_zbs";
328328

@@ -338,16 +338,14 @@ std::string riscv::getRISCVArch(const llvm::opt::ArgList &Args,
338338
if (Triple.isRISCV32()) {
339339
if (Triple.getOS() == llvm::Triple::UnknownOS)
340340
return "rv32imac";
341-
else
342-
return "rv32imafdc";
343-
} else {
344-
if (Triple.getOS() == llvm::Triple::UnknownOS)
345-
return "rv64imac";
346-
else if (Triple.isAndroid())
347-
return "rv64imafdcv_zba_zbb_zbs";
348-
else
349-
return "rv64imafdc";
341+
return "rv32imafdc";
350342
}
343+
344+
if (Triple.getOS() == llvm::Triple::UnknownOS)
345+
return "rv64imac";
346+
if (Triple.isAndroid())
347+
return "rv64imafdcv_zba_zbb_zbs";
348+
return "rv64imafdc";
351349
}
352350

353351
std::string riscv::getRISCVTargetCPU(const llvm::opt::ArgList &Args,

0 commit comments

Comments
 (0)