projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3a407f
)
Add a getContext() convenient accessor on mlir::Value (NFC)
author
Mehdi Amini
<aminim@google.com>
Mon, 1 Apr 2019 17:36:50 +0000
(10:36 -0700)
committer
Mehdi Amini
<joker.eph@gmail.com>
Mon, 1 Apr 2019 18:00:43 +0000
(11:00 -0700)
--
PiperOrigin-RevId:
241352789
mlir/include/mlir/IR/Value.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir/IR/Value.h
b/mlir/include/mlir/IR/Value.h
index
948870b
..
30f352b
100644
(file)
--- a/
mlir/include/mlir/IR/Value.h
+++ b/
mlir/include/mlir/IR/Value.h
@@
-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