LLVM 20.0.0git
Public Member Functions | List of all members
llvm::SaveAndRestore< T > Struct Template Reference

A utility class that uses RAII to save and restore the value of a variable. More...

#include "llvm/Support/SaveAndRestore.h"

Public Member Functions

 SaveAndRestore (T &X)
 
 SaveAndRestore (T &X, const T &NewValue)
 
 SaveAndRestore (T &X, T &&NewValue)
 
 ~SaveAndRestore ()
 
const Tget ()
 

Detailed Description

template<typename T>
struct llvm::SaveAndRestore< T >

A utility class that uses RAII to save and restore the value of a variable.

Definition at line 23 of file SaveAndRestore.h.

Constructor & Destructor Documentation

◆ SaveAndRestore() [1/3]

template<typename T >
llvm::SaveAndRestore< T >::SaveAndRestore ( T X)
inline

Definition at line 24 of file SaveAndRestore.h.

◆ SaveAndRestore() [2/3]

template<typename T >
llvm::SaveAndRestore< T >::SaveAndRestore ( T X,
const T NewValue 
)
inline

Definition at line 25 of file SaveAndRestore.h.

◆ SaveAndRestore() [3/3]

template<typename T >
llvm::SaveAndRestore< T >::SaveAndRestore ( T X,
T &&  NewValue 
)
inline

Definition at line 26 of file SaveAndRestore.h.

◆ ~SaveAndRestore()

template<typename T >
llvm::SaveAndRestore< T >::~SaveAndRestore ( )
inline

Definition at line 29 of file SaveAndRestore.h.

Member Function Documentation

◆ get()

template<typename T >
const T & llvm::SaveAndRestore< T >::get ( )
inline

Definition at line 30 of file SaveAndRestore.h.


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