LLVM  14.0.0git
Public Member Functions | List of all members
llvm::unittest::TempLink Class Reference

A RAII object that creates a link upon initialization and removes it upon destruction. More...

#include "llvm/Testing/Support/SupportHelpers.h"

Public Member Functions

 TempLink (StringRef Target, StringRef Link)
 Creates a managed link at path Link pointing to Target. More...
 
 ~TempLink ()
 
 TempLink (const TempLink &)=delete
 
TempLinkoperator= (const TempLink &)=delete
 
 TempLink (TempLink &&)=default
 
TempLinkoperator= (TempLink &&)=default
 
StringRef path () const
 The path to the link. More...
 

Detailed Description

A RAII object that creates a link upon initialization and removes it upon destruction.

The link may be a soft or a hard link, depending on the platform.

Definition at line 173 of file SupportHelpers.h.

Constructor & Destructor Documentation

◆ TempLink() [1/3]

llvm::unittest::TempLink::TempLink ( StringRef  Target,
StringRef  Link 
)
inline

Creates a managed link at path Link pointing to Target.

Definition at line 178 of file SupportHelpers.h.

References llvm::SmallVectorImpl< T >::clear(), llvm::sys::fs::create_link(), and llvm::codeview::Link.

◆ ~TempLink()

llvm::unittest::TempLink::~TempLink ( )
inline

◆ TempLink() [2/3]

llvm::unittest::TempLink::TempLink ( const TempLink )
delete

◆ TempLink() [3/3]

llvm::unittest::TempLink::TempLink ( TempLink &&  )
default

Member Function Documentation

◆ operator=() [1/2]

TempLink& llvm::unittest::TempLink::operator= ( const TempLink )
delete

◆ operator=() [2/2]

TempLink& llvm::unittest::TempLink::operator= ( TempLink &&  )
default

◆ path()

StringRef llvm::unittest::TempLink::path ( ) const
inline

The path to the link.

Definition at line 198 of file SupportHelpers.h.


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