[llvm] [LLVM][Triple] Drop unknown object types from normalized triples (PR #135571)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 13 19:07:23 PDT 2025


================
@@ -1265,6 +1266,14 @@ std::string Triple::normalize(StringRef Str, CanonicalForm Form) {
     }
   }
 
+  // Environment "unknown-elf" is just "elf".
----------------
shiltian wrote:

I think the rest of the changes is fine, but this doesn't look right to me, especially looking at `parseEnvironment`, they are not the same. I agree that the object format is treated as part of the environment, but that doesn't mean that `unknown-elf` is `elf`. Also, I think `unknown` environment will yield `UnknownEnvironment`, based on `parseEnvironment`.

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


More information about the llvm-commits mailing list