struct SaveAndRestore
Declaration
template <typename T>
struct SaveAndRestore { /* full declaration omitted */ };
Description
A utility class that uses RAII to save and restore the value of a variable.
Declared at: llvm/include/llvm/Support/SaveAndRestore.h:21
Templates
- T
Method Overview
- public SaveAndRestore<T>(T & X)
- public SaveAndRestore<T>(T & X, const T & NewValue)
- public T get()
- public ~SaveAndRestore<T>()
Methods
¶SaveAndRestore<T>(T& X)
SaveAndRestore<T>(T& X)
Declared at: llvm/include/llvm/Support/SaveAndRestore.h:22
Parameters
- T& X
¶SaveAndRestore<T>(T& X, const T& NewValue)
SaveAndRestore<T>(T& X, const T& NewValue)
Declared at: llvm/include/llvm/Support/SaveAndRestore.h:23
Parameters
- T& X
- const T& NewValue
¶T get()
T get()
Declared at: llvm/include/llvm/Support/SaveAndRestore.h:27
¶~SaveAndRestore<T>()
~SaveAndRestore<T>()
Declared at: llvm/include/llvm/Support/SaveAndRestore.h:26