[clang] [llvm] [llvm][tools] Extend llvm-objdump to support nested OffloadBinaries (PR #185425)
Alex Duran via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 26 06:20:20 PDT 2026
================
@@ -0,0 +1,72 @@
+## Test that llvm-objdump can display nested OffloadBinary images.
+
+# The content blobs below were generated from the following YAML Input
+#!Offload
+#Members:
+# - ImageKind: IMG_Bitcode
+# OffloadKind: OFK_OpenMP
+# String:
+# - Key: "triple"
+# Value: "x-y-z"
+# - Key: "arch"
+# Value: "arch1"
+# - ImageKind: IMG_Bitcode
+# OffloadKind: OFK_OpenMP
+# String:
+# - Key: "triple"
+# Value: "x-y-z"
+# - Key: "arch"
+# Value: "arch2"
+
+# RUN: yaml2obj %s -o %t.bin
+# RUN: llvm-objdump --offloading %t.bin | FileCheck %s
+
+!Offload
+Members:
+ - ImageKind: IMG_Object
+ OffloadKind: OFK_OpenMP
+ String:
+ - Key: "triple"
+ Value: "x-y-z"
+ - Key: "arch"
+ Value: "none"
+ Content: 10ff10ad02000000f00000000000000020000000000000000200000000000000020001000000000070000000000000000200000000000000f00000000000000000000000000000000200010000000000a0000000000000000200000000000000f0000000000000000000000000000000dc00000000000000d1000000000000000500000000000000d700000000000000e9000000000000000500000000000000dc00000000000000d1000000000000000500000000000000d700000000000000e300000000000000050000000000000000782d792d7a006172636800747269706c650061726368320061726368310000
+ - ImageKind: IMG_Object
+ OffloadKind: OFK_OpenMP
+ String:
+ - Key: "triple"
+ Value: "a-b-c"
+ - Key: "arch"
+ Value: "none"
+ Content: 10ff10ad02000000f00000000000000020000000000000000200000000000000020001000000000070000000000000000200000000000000f00000000000000000000000000000000200010000000000a0000000000000000200000000000000f0000000000000000000000000000000dc00000000000000d1000000000000000500000000000000d700000000000000e9000000000000000500000000000000dc00000000000000d1000000000000000500000000000000d700000000000000e300000000000000050000000000000000782d792d7a006172636800747269706c650061726368320061726368310000
+
+# CHECK: OFFLOADING IMAGE [0]:
----------------
adurang wrote:
Done
https://github.com/llvm/llvm-project/pull/185425
More information about the cfe-commits
mailing list