Skip to content

Commit 0871c4b

Browse files
authored
[Driver][Solaris] Remove reachable llvm_unreachable (#76645)
Remove the llvm_unreachable from getSolarisLibSuffix(). The code path is reachable. In the case of an unsupported architecture we're not worrying about trying to actually find the library paths, and I don't think it makes sense for the Driver to crash. Fixes #58334
1 parent 90c397f commit 0871c4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Driver/ToolChains/Solaris.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,12 @@ static StringRef getSolarisLibSuffix(const llvm::Triple &Triple) {
295295
switch (Triple.getArch()) {
296296
case llvm::Triple::x86:
297297
case llvm::Triple::sparc:
298+
default:
298299
break;
299300
case llvm::Triple::x86_64:
300301
return "/amd64";
301302
case llvm::Triple::sparcv9:
302303
return "/sparcv9";
303-
default:
304-
llvm_unreachable("Unsupported architecture");
305304
}
306305
return "";
307306
}

0 commit comments

Comments
 (0)