LLVM  15.0.0git
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 97 of file DebugUtils.h.

## ◆ DumpObjects()

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

Construct a DumpObjects transform that will dump objects to disk.

Parameters
 DumpDir specifies 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. IdentifierOverride specifies 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 .o, .2.o, .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.

## ◆ operator()()

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

Dumps the given buffer to disk.

Definition at line 311 of file DebugUtils.cpp.

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