From 81f445b7df94de485240b21034682f22432729c4 Mon Sep 17 00:00:00 2001 From: Yury Plyakhin Date: Wed, 11 Feb 2026 10:21:22 -0800 Subject: [clang-sycl-linker][offload] Set TheImageKind based on IsAOTCompileNeeded flag (#180269) Previously, TheImageKind was set to IMG_None and relied on a runtime heuristic to determine the correct image type. This commit sets it explicitly to IMG_Object for AOT-compiled images and IMG_SPIRV for SPIR-V images based on the IsAOTCompileNeeded flag. Also it adds test for this change, which required minor changes in OffloadBinary and OffloadDump. --- llvm/tools/llvm-objdump/OffloadDump.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/tools/llvm-objdump') diff --git a/llvm/tools/llvm-objdump/OffloadDump.cpp b/llvm/tools/llvm-objdump/OffloadDump.cpp index a77537dd90ee..cd2727069c2e 100644 --- a/llvm/tools/llvm-objdump/OffloadDump.cpp +++ b/llvm/tools/llvm-objdump/OffloadDump.cpp @@ -36,6 +36,8 @@ static StringRef getImageName(const OffloadBinary &OB) { return "fatbinary"; case IMG_PTX: return "ptx"; + case IMG_SPIRV: + return "spir-v"; default: return ""; } -- cgit v1.2.3