|
My Project
|
#include <Builders.h>
Public Member Functions | |
| ScopedContext (OpBuilder &builder, Location location) | |
| ScopedContext (OpBuilder &builder, OpBuilder::InsertPoint newInsertPt, Location location) | |
| ~ScopedContext () | |
Static Public Member Functions | |
| static MLIRContext * | getContext () |
| static OpBuilder & | getBuilder () |
| static Location | getLocation () |
Friends | |
| class | NestedBuilder |
Helper class to transparently handle builder insertion points by RAII. As its name indicates, a ScopedContext is means to be used locally in a scoped fashion. This abstracts away all the boilerplate related to checking proper usage of captures, NestedBuilders as well as handling the setting and restoring of insertion points.
| mlir::edsc::ScopedContext::ScopedContext | ( | OpBuilder & | builder, |
| OpBuilder::InsertPoint | newInsertPt, | ||
| Location | location | ||
| ) |
Sets the insertion point of the builder to 'newInsertPt' for the duration of the scope. The existing insertion point of the builder is restored on destruction.
| mlir::edsc::ScopedContext::~ScopedContext | ( | ) |
|
static |
|
static |
|
static |
|
friend |
Only NestedBuilder (which is used to create an operation with a body) may access private members in order to implement scoping.
1.8.13