https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/175073
Fatal error is more appropriate than unreachable when the SDKSettings is not in a recognized form (encountered in a few tests with incomplete SDKSettings.json). >From cf3709ed2193df84c50a3a8e2d62b81468f878d0 Mon Sep 17 00:00:00 2001 From: Ian Anderson <[email protected]> Date: Thu, 8 Jan 2026 13:32:37 -0800 Subject: [PATCH] [clang][driver][darwin] Report bad SDKSettings as a fatal error rather than unreachable Fatal error is more appropriate than unreachable when the SDKSettings is not in a recognized form (encountered in a few tests with incomplete SDKSettings.json). --- clang/lib/Basic/DarwinSDKInfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/lib/Basic/DarwinSDKInfo.cpp b/clang/lib/Basic/DarwinSDKInfo.cpp index 4fd31b841b23d..b55ffd1c39a86 100644 --- a/clang/lib/Basic/DarwinSDKInfo.cpp +++ b/clang/lib/Basic/DarwinSDKInfo.cpp @@ -112,7 +112,9 @@ parsePlatformInfos(const llvm::json::Object &Obj, VersionTuple Version) { llvm::Triple::UnknownEnvironment, llvm::Triple::MachO, "/System/DriverKit"}); } else { - llvm_unreachable("Unrecognized Xcode platform"); + llvm::reportFatalUsageError( + "Unrecognized CanonicalName in SDKSettings.json. SupportedTargets is " + "expected, or a recognized CanonicalName."); } return PlatformInfos; } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
