LLVM  14.0.0git
Public Member Functions | List of all members
llvm::orc::DumpObjects Class Reference

A function object that can be used as an ObjectTransformLayer transform to dump object files to disk at a specified path. More...

#include "llvm/ExecutionEngine/Orc/DebugUtils.h"

Public Member Functions

 DumpObjects (std::string DumpDir="", std::string IdentifierOverride="")
 Construct a DumpObjects transform that will dump objects to disk. More...
 
Expected< std::unique_ptr< MemoryBuffer > > operator() (std::unique_ptr< MemoryBuffer > Obj)
 Dumps the given buffer to disk. More...
 

Detailed Description

A function object that can be used as an ObjectTransformLayer transform to dump object files to disk at a specified path.

Definition at line 100 of file DebugUtils.h.

Constructor & Destructor Documentation

◆ DumpObjects()

llvm::orc::DumpObjects::DumpObjects ( std::string  DumpDir = "",
std::string  IdentifierOverride = "" 
)

Construct a DumpObjects transform that will dump objects to disk.

Parameters
DumpDirspecifies the path to write dumped objects to. DumpDir may be empty, in which case files will be dumped to the working directory. If DumpDir is non-empty then any trailing separators will be discarded.
IdentifierOverridespecifies a file name stem to use when dumping objects. If empty, each MemoryBuffer's identifier will be used (with a .o suffix added if not already present). If an identifier override is supplied it will be used instead (since all buffers will use the same identifier, the resulting files will be named <ident>.o, <ident>.2.o, <ident>.3.o, and so on). IdentifierOverride should not contain an extension, as a .o suffix will be added by DumpObjects.

Discard any trailing separators.

Definition at line 300 of file DebugUtils.cpp.

References llvm::sys::path::is_separator(), and this.

Member Function Documentation

◆ operator()()

Expected< std::unique_ptr< MemoryBuffer > > llvm::orc::DumpObjects::operator() ( std::unique_ptr< MemoryBuffer Obj)

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