LLVM 18.0.0git
|
#include "llvm/DWARFLinkerParallel/DWARFLinker.h"
Public Types | |
enum class | OutputFileType { Object , Assembly } |
Type of output file. More... | |
enum class | AccelTableKind : uint8_t { Apple , Pub , DebugNames } |
The kind of accelerator tables we should emit. 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 | TranslatorFuncTy = std::function< StringRef(StringRef)> |
using | SwiftInterfacesMapTy = std::map< std::string, std::string > |
Public Member Functions | |
virtual | ~DWARFLinker ()=default |
virtual Error | createEmitter (const Triple &TheTriple, OutputFileType FileType, raw_pwrite_stream &OutFile)=0 |
Creates emitter for output dwarf. | |
virtual ExtraDwarfEmitter * | getEmitter ()=0 |
Returns previously created dwarf emitter. May be nullptr. | |
virtual void | addObjectFile (DWARFFile &File, ObjFileLoaderTy Loader=nullptr, CompileUnitHandlerTy OnCUDieLoaded=[](const DWARFUnit &) {})=0 |
Add object file to be linked. | |
virtual Error | link ()=0 |
Link debug info for added files. | |
virtual void | setVerbosity (bool Verbose)=0 |
Allows to generate log of linking process to the 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 UpdateIndexTablesOnly)=0 |
Update index tables only(do not modify rest of DWARF). | |
virtual void | setAllowNonDeterministicOutput (bool AllowNonDeterministicOutput)=0 |
Allow generating valid, but non-deterministic output. | |
virtual void | setKeepFunctionForStatic (bool KeepFunctionForStatic)=0 |
Set 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 (const std::string &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 which would be 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. | |
Static Public Member Functions | |
static std::unique_ptr< DWARFLinker > | createLinker (MessageHandlerTy ErrorHandler, MessageHandlerTy WarningHandler, TranslatorFuncTy StringsTranslator=nullptr) |
Creates dwarf linker instance. | |
Definition at line 114 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::CompileUnitHandlerTy = function_ref<void(const DWARFUnit &Unit)> |
Definition at line 135 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::InputVerificationHandlerTy = std::function<void(const DWARFFile &File, llvm::StringRef Output)> |
Definition at line 133 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::MessageHandlerTy = std::function<void( const Twine &Warning, StringRef Context, const DWARFDie *DIE)> |
Definition at line 129 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::ObjectPrefixMapTy = std::map<std::string, std::string> |
Definition at line 134 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::ObjFileLoaderTy = std::function<ErrorOr<DWARFFile &>( StringRef ContainerName, StringRef Path)> |
Definition at line 131 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::SwiftInterfacesMapTy = std::map<std::string, std::string> |
Definition at line 137 of file DWARFLinker.h.
using llvm::dwarflinker_parallel::DWARFLinker::TranslatorFuncTy = std::function<StringRef(StringRef)> |
Definition at line 136 of file DWARFLinker.h.
|
strong |
The kind of accelerator tables we should emit.
Enumerator | |
---|---|
Apple | .apple_names, .apple_namespaces, .apple_types, .apple_objc. |
Pub | .debug_pubnames, .debug_pubtypes |
DebugNames | .debug_names. |
Definition at line 123 of file DWARFLinker.h.
|
strong |
|
virtualdefault |
|
pure virtual |
Add object file to be linked.
Pre-load compile unit die. Call OnCUDieLoaded
for each compile unit die. If specified File
has reference to the Clang module then such module would be pre-loaded by Loader
for !Update case.
Implemented in llvm::dwarflinker_parallel::DWARFLinkerImpl.
|
pure virtual |
Creates emitter for output dwarf.
Implemented in llvm::dwarflinker_parallel::DWARFLinkerImpl.
|
static |
Creates dwarf linker instance.
Definition at line 13 of file DWARFLinker.cpp.
References ErrorHandler.
|
pure virtual |
Returns previously created dwarf emitter. May be nullptr.
Implemented in llvm::dwarflinker_parallel::DWARFLinkerImpl.
|
pure virtual |
Link debug info for added files.
Implemented in llvm::dwarflinker_parallel::DWARFLinkerImpl.