Add a getContext() convenient accessor on mlir::Value (NFC)

--

PiperOrigin-RevId: 241352789
This commit is contained in:
Mehdi Amini 2019-04-01 10:36:50 -07:00 committed by Mehdi Amini
parent b3a407fa68
commit 005d54329e
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ public:
Type getType() { return typeAndKind.getPointer(); }
/// Utility to get the associated MLIRContext that this value is defined in.
MLIRContext *getContext() { return getType().getContext(); }
/// Mutate the type of this Value to be of the specified type.
///
/// Note that this is an extremely dangerous operation which can create