[llvm] Extend llvm objdump fatbin (PR #114834)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 17:55:52 PST 2025
================
@@ -183,11 +210,159 @@ class OffloadFile : public OwningBinary<OffloadBinary> {
}
};
+/// Bundle entry in binary clang-offload-bundler format.
+struct OffloadBundleEntry {
+ uint64_t Offset = 0u;
+ uint64_t Size = 0u;
+ uint64_t IDLength = 0u;
+ StringRef ID;
+ OffloadBundleEntry(uint64_t O, uint64_t S, uint64_t I, StringRef T)
+ : Offset(O), Size(S), IDLength(I), ID(T) {}
+ void dumpInfo(raw_ostream &OS) {
+ OS << "Offset = " << Offset << ", Size = " << Size
+ << ", ID Length = " << IDLength << ", ID = " << ID;
+ }
+ void dumpURI(raw_ostream &OS, StringRef filePath) {
+ OS << ID.data() << "\tfile://" << filePath << "#offset=" << Offset
+ << "&size=" << Size << "\n";
+ }
+};
+
+/// Fat binary embedded in object files in clang-offload-bundler format
+class OffloadBundleFatBin {
+
+private:
----------------
jhuber6 wrote:
```suggestion
```
Nit. redundant.
https://github.com/llvm/llvm-project/pull/114834
More information about the llvm-commits
mailing list