llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

Seed the module's DataLayout from the target triple directly rather than from
TargetMachine::createDataLayout().

Co-authored-by: Claude (Claude-Opus-4.8) &lt;noreply@<!-- -->anthropic.com&gt;

---
Full diff: https://github.com/llvm/llvm-project/pull/224376.diff


1 Files Affected:

- (modified) clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp (+1-1) 


``````````diff
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp 
b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 70afc6d6c4cea..0f05de29f5118 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -652,7 +652,7 @@ static Error runCodeGen(StringRef File, const llvm::Triple 
&TargetTriple,
 
   // Set data layout if needed.
   if (M->getDataLayout().isDefault())
-    M->setDataLayout(TM->createDataLayout());
+    M->setDataLayout(TargetTriple.computeDataLayout());
 
   // Open output file for writing.
   int FD = -1;

``````````

</details>


https://github.com/llvm/llvm-project/pull/224376
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to