LLVM 20.0.0git
|
The base interface for DWARFLinker implementations. More...
#include "llvm/DWARFLinker/DWARFLinkerBase.h"
Public Types | |
enum class | OutputFileType : uint8_t { Object , Assembly } |
Type of output file. More... | |
enum class | AccelTableKind : uint8_t { Apple , Pub , DebugNames } |
The kind of accelerator tables to be emitted. More... | |
using | MessageHandlerTy = std::function< void(const Twine &Warning, StringRef Context, const DWARFDie *DIE)> |
using | ObjFileLoaderTy = std::function< ErrorOr< DWARFFile & >(StringRef ContainerName, StringRef Path)> |
using | InputVerificationHandlerTy = std::function< void(const DWARFFile &File, llvm::StringRef Output)> |
using | ObjectPrefixMapTy = std::map< std::string, std::string > |
using | CompileUnitHandlerTy = function_ref< void(const DWARFUnit &Unit)> |
using | SwiftInterfacesMapTy = std::map< std::string, std::string > |
Public Member Functions | |
virtual | ~DWARFLinkerBase ()=default |
virtual void | addObjectFile (DWARFFile &File, ObjFileLoaderTy Loader=nullptr, CompileUnitHandlerTy OnCUDieLoaded=[](const DWARFUnit &) {})=0 |
Add an object file to be linked. | |
virtual Error | link ()=0 |
Link the debug info for all object files added through calls to addObjectFile. | |
virtual void | setVerbosity (bool Verbose)=0 |
A number of methods setting various linking options: Enable logging to standard output. | |
virtual void | setStatistics (bool Statistics)=0 |
Print statistics to standard output. | |
virtual void | setVerifyInputDWARF (bool Verify)=0 |
Verify the input DWARF. | |
virtual void | setNoODR (bool NoODR)=0 |
Do not unique types according to ODR. | |
virtual void | setUpdateIndexTablesOnly (bool Update)=0 |
Update index tables only (do not modify rest of DWARF). | |
virtual void | setAllowNonDeterministicOutput (bool)=0 |
Allows generating non-deterministic output in exchange for more parallelism. | |
virtual void | setKeepFunctionForStatic (bool KeepFunctionForStatic)=0 |
Set whether to keep the enclosing function for a static variable. | |
virtual void | setNumThreads (unsigned NumThreads)=0 |
Use specified number of threads for parallel files linking. | |
virtual void | addAccelTableKind (AccelTableKind Kind)=0 |
Add kind of accelerator tables to be generated. | |
virtual void | setPrependPath (StringRef Ppath)=0 |
Set prepend path for clang modules. | |
virtual void | setEstimatedObjfilesAmount (unsigned ObjFilesNum)=0 |
Set estimated objects files amount, for preliminary data allocation. | |
virtual void | setInputVerificationHandler (InputVerificationHandlerTy Handler)=0 |
Set verification handler used to report verification errors. | |
virtual void | setSwiftInterfacesMap (SwiftInterfacesMapTy *Map)=0 |
Set map for Swift interfaces. | |
virtual void | setObjectPrefixMap (ObjectPrefixMapTy *Map)=0 |
Set prefix map for objects. | |
virtual Error | setTargetDWARFVersion (uint16_t TargetDWARFVersion)=0 |
Set target DWARF version. | |
The base interface for DWARFLinker implementations.
Definition at line 74 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::CompileUnitHandlerTy = function_ref<void(const DWARFUnit &Unit)> |
Definition at line 84 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::InputVerificationHandlerTy = std::function<void(const DWARFFile &File, llvm::StringRef Output)> |
Definition at line 81 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::MessageHandlerTy = std::function<void( const Twine &Warning, StringRef Context, const DWARFDie *DIE)> |
Definition at line 77 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::ObjectPrefixMapTy = std::map<std::string, std::string> |
Definition at line 83 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::ObjFileLoaderTy = std::function<ErrorOr<DWARFFile &>( StringRef ContainerName, StringRef Path)> |
Definition at line 79 of file DWARFLinkerBase.h.
using llvm::dwarf_linker::DWARFLinkerBase::SwiftInterfacesMapTy = std::map<std::string, std::string> |
Definition at line 85 of file DWARFLinkerBase.h.
|
strong |
The kind of accelerator tables to be emitted.
Enumerator | |
---|---|
Apple | .apple_names, .apple_namespaces, .apple_types, .apple_objc. |
Pub | .debug_pubnames, .debug_pubtypes |
DebugNames | .debug_names. |
Definition at line 92 of file DWARFLinkerBase.h.
|
strong |
|
virtualdefault |
|
pure virtual |
Add kind of accelerator tables to be generated.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Add an object file to be linked.
Pre-load compile unit die. Call OnCUDieLoaded
for each compile unit die. If File
has reference to a Clang module and UpdateIndexTablesOnly == false then the module is be pre-loaded by Loader
.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Link the debug info for all object files added through calls to addObjectFile.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Allows generating non-deterministic output in exchange for more parallelism.
Implemented in llvm::dwarf_linker::parallel::DWARFLinkerImpl, and llvm::dwarf_linker::classic::DWARFLinker.
|
pure virtual |
Set estimated objects files amount, for preliminary data allocation.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set verification handler used to report verification errors.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set whether to keep the enclosing function for a static variable.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Do not unique types according to ODR.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Use specified number of threads for parallel files linking.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set prefix map for objects.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set prepend path for clang modules.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Print statistics to standard output.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set map for Swift interfaces.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Set target DWARF version.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Update index tables only (do not modify rest of DWARF).
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
A number of methods setting various linking options: Enable logging to standard output.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.
|
pure virtual |
Verify the input DWARF.
Implemented in llvm::dwarf_linker::classic::DWARFLinker, and llvm::dwarf_linker::parallel::DWARFLinkerImpl.