[llvm] [DirectX] Fix DXIL part header version encoding (PR #91506)

Damyan Pepper via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 13:11:27 PDT 2024


================
@@ -537,8 +537,8 @@ static int compileModule(char **argv, LLVMContext &Context) {
       // If we are supposed to override the target triple, do so now.
       std::string IRTargetTriple = DataLayoutTargetTriple.str();
       if (!TargetTriple.empty())
-        IRTargetTriple = Triple::normalize(TargetTriple);
-      TheTriple = Triple(IRTargetTriple);
+        IRTargetTriple = TargetTriple;
+      TheTriple = Triple(Triple::normalize(IRTargetTriple));
----------------
damyanp wrote:

Doesn't `Triple::normalize` return a `Triple`, so it doesn't need to be wrapped inside `Triple()`?

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


More information about the llvm-commits mailing list