clang 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::OffloadBundler Class Reference

#include "clang/Driver/OffloadBundler.h"

Public Member Functions

 OffloadBundler (const OffloadBundlerConfig &BC)
 
llvm::Error BundleFiles ()
 Bundle the files. Return true if an error was found.
 
llvm::Error UnbundleFiles ()
 
llvm::Error UnbundleArchive ()
 UnbundleArchive takes an archive file (".a") as input containing bundled code object files, and a list of offload targets (not host), and extracts the code objects into a new archive file for each offload target.
 

Static Public Member Functions

static llvm::Error ListBundleIDsInFile (llvm::StringRef InputFileName, const OffloadBundlerConfig &BundlerConfig)
 

Public Attributes

const OffloadBundlerConfigBundlerConfig
 

Detailed Description

Definition at line 55 of file OffloadBundler.h.

Constructor & Destructor Documentation

◆ OffloadBundler()

clang::OffloadBundler::OffloadBundler ( const OffloadBundlerConfig BC)
inline

Definition at line 60 of file OffloadBundler.h.

Member Function Documentation

◆ BundleFiles()

Error OffloadBundler::BundleFiles ( )

◆ ListBundleIDsInFile()

Error OffloadBundler::ListBundleIDsInFile ( llvm::StringRef  InputFileName,
const OffloadBundlerConfig BundlerConfig 
)
static

◆ UnbundleArchive()

Error OffloadBundler::UnbundleArchive ( )

UnbundleArchive takes an archive file (".a") as input containing bundled code object files, and a list of offload targets (not host), and extracts the code objects into a new archive file for each offload target.

Each resulting archive file contains all code object files corresponding to that particular offload target. The created archive file does not contain an index of the symbols and code object files are named as <<Parent Bundle Name>-<CodeObject's TargetID>>, with ':' replaced with '_'.

Map of target names with list of object files that will form the device specific archive for that target

Iterate over all bundled code object files in the input archive.

Write out an archive for each target

Definition at line 1632 of file OffloadBundler.cpp.

References clang::OffloadBundlerConfig::AllowMissingBundles, BundlerConfig, CheckHeterogeneousArchive(), clang::OffloadBundlerConfig::CheckInputArchive, CreateFileHandler(), clang::CompressedOffloadBundle::decompress(), clang::FileName, getCompatibleOffloadTargets(), getDefaultArchiveKindForHost(), getDeviceLibraryFileName(), clang::OffloadBundlerConfig::InputFileNames, clang::OffloadBundlerConfig::OutputFileNames, clang::Target, clang::OffloadBundlerConfig::TargetNames, and clang::OffloadBundlerConfig::Verbose.

◆ UnbundleFiles()

Error OffloadBundler::UnbundleFiles ( )

Member Data Documentation

◆ BundlerConfig

const OffloadBundlerConfig& clang::OffloadBundler::BundlerConfig

Definition at line 57 of file OffloadBundler.h.

Referenced by BundleFiles(), ListBundleIDsInFile(), UnbundleArchive(), and UnbundleFiles().


The documentation for this class was generated from the following files: