[all-commits] [llvm/llvm-project] afd2f7: [Binary] Promote OffloadBinary to inherit from Binary

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Jun 1 15:41:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afd2f7e9919737e30f9fae2d3cff892189301a55
      https://github.com/llvm/llvm-project/commit/afd2f7e9919737e30f9fae2d3cff892189301a55
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-06-01 (Wed, 01 Jun 2022)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M llvm/include/llvm-c/Object.h
    M llvm/include/llvm/BinaryFormat/Magic.h
    M llvm/include/llvm/Object/Binary.h
    M llvm/include/llvm/Object/OffloadBinary.h
    M llvm/lib/BinaryFormat/Magic.cpp
    M llvm/lib/Object/Binary.cpp
    M llvm/lib/Object/Object.cpp
    M llvm/lib/Object/ObjectFile.cpp
    M llvm/lib/Object/OffloadBinary.cpp
    M llvm/unittests/Object/OffloadingTest.cpp

  Log Message:
  -----------
  [Binary] Promote OffloadBinary to inherit from Binary

We use the `OffloadBinary` to create binary images of offloading files
and their corresonding metadata. This patch changes this to inherit from
the base `Binary` class. This allows us to create and insepect these
more generically. This patch includes all the necessary glue to
implement this as a new binary format, along with added the magic bytes
we use to distinguish the offloading binary to the `file_magic`
implementation.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D126812




More information about the All-commits mailing list