Index: lib/Driver/ToolChains/Clang.cpp =================================================================== --- lib/Driver/ToolChains/Clang.cpp +++ lib/Driver/ToolChains/Clang.cpp @@ -529,6 +529,9 @@ // XCore never wants frame pointers, regardless of OS. // WebAssembly never wants frame pointers. return false; + case llvm::Triple::riscv32: + case llvm::Triple::riscv64: + return !areOptimizationsEnabled(Args); default: break; } @@ -552,14 +555,6 @@ } } - switch (Triple.getArch()) { - case llvm::Triple::riscv32: - case llvm::Triple::riscv64: - return !areOptimizationsEnabled(Args); - default: - break; - } - if (Triple.isOSWindows()) { switch (Triple.getArch()) { case llvm::Triple::x86: