[Lldb-commits] [lldb] [lldb] Fix offload bundle unit tests on 32-bit systems (PR #226922)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 28 02:03:30 PDT 2026


https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/226922

>From 9c412a2306b8eb0972314bfe7e9c4759d58ed827 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at arm.com>
Date: Mon, 28 Sep 2026 08:54:10 +0000
Subject: [PATCH] [lldb] Fix offload bundle unit tests on 32-bit systems

DataExtractor::GetByteSize returns uint64_t for reasons
I don't yet understand. I might change it to size_t but
let's unblock the build for now.

Fixes #222362 / 08ee0ef5da10d27d5776df1e1ff81c46a38d9b5c.
---
 .../ObjectContainerClangOffloadBundleTest.cpp               | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lldb/unittests/ObjectContainer/ObjectContainerClangOffloadBundleTest.cpp b/lldb/unittests/ObjectContainer/ObjectContainerClangOffloadBundleTest.cpp
index 182a1c1214bb3..4905d3a1597e8 100644
--- a/lldb/unittests/ObjectContainer/ObjectContainerClangOffloadBundleTest.cpp
+++ b/lldb/unittests/ObjectContainer/ObjectContainerClangOffloadBundleTest.cpp
@@ -281,9 +281,11 @@ TEST_F(ObjectContainerClangOffloadBundleTest,
   std::array<BundleInput, 3> inputs = {{
       {"host-x86_64-unknown-linux-gnu", {}},
       {"hipv4-amdgpu-amd-amdhsa--gfx908",
-       {gfx908_data->GetDataStart(), gfx908_data->GetByteSize()}},
+       {gfx908_data->GetDataStart(),
+        static_cast<size_t>(gfx908_data->GetByteSize())}},
       {"hipv4-amdgpu-amd-amdhsa--gfx942",
-       {gfx942_data->GetDataStart(), gfx942_data->GetByteSize()}},
+       {gfx942_data->GetDataStart(),
+        static_cast<size_t>(gfx942_data->GetByteSize())}},
   }};
   BundleData bundle = MakeBundle(inputs);
   auto bundled_file = MakeELFContainingBundle(bundle.bytes);



More information about the lldb-commits mailing list