[clang] [llvm] [Triple] Make an target triple "os" for firmware (PR #176272)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 09:11:36 PST 2026
================
@@ -757,6 +759,7 @@ static Triple::OSType parseOS(StringRef OSName) {
.StartsWith("vulkan", Triple::Vulkan)
.StartsWith("cheriotrtos", Triple::CheriotRTOS)
.StartsWith("chipstar", Triple::ChipStar)
+ .StartsWith("firmware", Triple::Firmware)
----------------
compnerd wrote:
That explicitly avoids the `unknown` vendor. What about say the Sony vendor? Or the Facebook vendor? That should be inverted - only allowing Apple. The bigger issue is that this is doing that at time of check rather than at triple parsing time. This makes it very fragile because suddenly, you can now handle a new architecture because it didn't get replicated. This check should be done at triple parsing time, where it would claim that the triple is invalid.
https://github.com/llvm/llvm-project/pull/176272
More information about the cfe-commits
mailing list