LLVM 22.0.0git
llvm::vfs::HashingOutputBackend< HasherT > Class Template Reference

An output backend that only generates the hash for outputs. More...

#include "llvm/Support/HashingOutputBackend.h"

Inheritance diagram for llvm::vfs::HashingOutputBackend< HasherT >:
[legend]

Public Member Functions

auto outputFiles () const
 Iterator for all the output file names.
std::optional< std::string > getHashValueForFile (StringRef Path)
 Get hash value for the output files in hex representation.
Public Member Functions inherited from llvm::vfs::OutputBackend
IntrusiveRefCntPtr< OutputBackendclone () const
 Get a backend that points to the same destination as this one but that has independent settings.
Expected< OutputFilecreateFile (const Twine &Path, std::optional< OutputConfig > Config=std::nullopt)
 Create a file.
virtual ~OutputBackend ()=default
Public Member Functions inherited from llvm::RefCountedBase< OutputBackend >
unsigned UseCount () const
void Retain () const
void Release () const

Protected Member Functions

IntrusiveRefCntPtr< OutputBackendcloneImpl () const override
 Must be thread-safe.
Expected< std::unique_ptr< OutputFileImpl > > createFileImpl (StringRef Path, std::optional< OutputConfig > Config) override
 Create a file for Path.
Protected Member Functions inherited from llvm::vfs::OutputBackend
 OutputBackend ()=default
Protected Member Functions inherited from llvm::RefCountedBase< OutputBackend >
 RefCountedBase ()=default
RefCountedBaseoperator= (const RefCountedBase &)=delete
 ~RefCountedBase ()

Friends

class HashingOutputFile< HasherT >

Detailed Description

template<typename HasherT>
class llvm::vfs::HashingOutputBackend< HasherT >

An output backend that only generates the hash for outputs.

Definition at line 62 of file HashingOutputBackend.h.

Member Function Documentation

◆ cloneImpl()

template<typename HasherT>
IntrusiveRefCntPtr< OutputBackend > llvm::vfs::HashingOutputBackend< HasherT >::cloneImpl ( ) const
inlineoverrideprotectedvirtual

Must be thread-safe.

Virtual function has a different name than clone() so that implementations can override the return value.

Implements llvm::vfs::OutputBackend.

Definition at line 71 of file HashingOutputBackend.h.

◆ createFileImpl()

template<typename HasherT>
Expected< std::unique_ptr< OutputFileImpl > > llvm::vfs::HashingOutputBackend< HasherT >::createFileImpl ( StringRef Path,
std::optional< OutputConfig > Config )
inlineoverrideprotectedvirtual

Create a file for Path.

Must be thread-safe.

Precondition
Config is valid or std::nullopt.

Implements llvm::vfs::OutputBackend.

Definition at line 76 of file HashingOutputBackend.h.

◆ getHashValueForFile()

template<typename HasherT>
std::optional< std::string > llvm::vfs::HashingOutputBackend< HasherT >::getHashValueForFile ( StringRef Path)
inline

Get hash value for the output files in hex representation.

Return None if the requested path is not generated.

Not thread safe. Should be queried after all outputs are written.

Definition at line 90 of file HashingOutputBackend.h.

References F, and llvm::toHex().

◆ outputFiles()

template<typename HasherT>
auto llvm::vfs::HashingOutputBackend< HasherT >::outputFiles ( ) const
inline

Iterator for all the output file names.

Not thread safe. Should be queried after all outputs are written.

Definition at line 84 of file HashingOutputBackend.h.

◆ HashingOutputFile< HasherT >

template<typename HasherT>
friend class HashingOutputFile< HasherT >
friend

Definition at line 53 of file HashingOutputBackend.h.


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