[clang] [clang][driver][darwin] DarwinSDKInfo doesn't match sufficiently modified triples, doesn't warn for unsupported architectures (PR #204061)

Steven Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 17 12:58:48 PDT 2026


================
@@ -100,39 +101,118 @@ parseOSAndEnvironment(std::optional<StringRef> XcodePlatform) {
   return {OS, Environment};
 }
 
+static DarwinSDKInfo::PlatformInfoStorageType
+legacyPlatformInfos(llvm::Triple::OSType SDKOS,
----------------
cachemeifyoucan wrote:

I am a bit worried about this function can create empty `PlatformInfoStorageType`, which is going to trigger the assertion, or a runtime crash on non-assert build at `Triple[0]`. Should there but a fallback default or somehow propagate an error type out and issue diagnoses? 

https://github.com/llvm/llvm-project/pull/204061


More information about the cfe-commits mailing list