[clang] dca7629 - clang-sycl-linker: Compute the DataLayout from the triple (#224376)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 21 06:03:28 PDT 2026
Author: Matt Arsenault
Date: 2026-09-21T13:03:20Z
New Revision: dca7629f289f3dc92efb80557463f08d56255365
URL: https://github.com/llvm/llvm-project/commit/dca7629f289f3dc92efb80557463f08d56255365
DIFF: https://github.com/llvm/llvm-project/commit/dca7629f289f3dc92efb80557463f08d56255365.diff
LOG: clang-sycl-linker: Compute the DataLayout from the triple (#224376)
Seed the module's DataLayout from the target triple directly rather than
from TargetMachine::createDataLayout().
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Added:
Modified:
clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
Removed:
################################################################################
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index b568c7e87ce7c..960190bc8620f 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -640,7 +640,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;
More information about the cfe-commits
mailing list