//===-- OffloadDump.cpp - Offloading dumper ---------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This file implements the offloading-specific dumper for llvm-objdump. /// //===----------------------------------------------------------------------===// #include "OffloadDump.h" #include "llvm-objdump.h" #include "llvm/Object/ELFObjectFile.h" #include "llvm/Support/Alignment.h" usingnamespacellvm; usingnamespacellvm::object; usingnamespacellvm::objdump; /// Get the printable name of the image kind. static StringRef getImageName(const OffloadBinary &OB) { … } static void printBinary(const OffloadBinary &OB, uint64_t Index) { … } /// Print the embedded offloading contents of an ObjectFile \p O. void llvm::dumpOffloadBinary(const ObjectFile &O) { … } /// Print the contents of an offload binary file \p OB. This may contain /// multiple binaries stored in the same buffer. void llvm::dumpOffloadSections(const OffloadBinary &OB) { … }