LLVM  6.0.0svn
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 get ()
 

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 22 of file SaveAndRestore.h.

Constructor & Destructor Documentation

◆ SaveAndRestore() [1/2]

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

Definition at line 23 of file SaveAndRestore.h.

◆ SaveAndRestore() [2/2]

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

Definition at line 24 of file SaveAndRestore.h.

◆ ~SaveAndRestore()

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

Definition at line 27 of file SaveAndRestore.h.

Member Function Documentation

◆ get()

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

Definition at line 28 of file SaveAndRestore.h.


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