aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2020-11-17 18:28:16 +0100
committerAlex Zinenko <zinenko@google.com>2020-11-24 09:16:25 +0100
commit029e199dbfd394c7a3c372a632a4ddac6b591648 (patch)
treeec52e85df8290c45b64e8d09aef8dd06010b102c /clang/lib/Frontend/CompilerInvocation.cpp
parent0b2d84fba84b098a2060862fcbcfccfb4ad1e3f2 (diff)
downloadllvm-029e199dbfd394c7a3c372a632a4ddac6b591648.zip
llvm-029e199dbfd394c7a3c372a632a4ddac6b591648.tar.gz
llvm-029e199dbfd394c7a3c372a632a4ddac6b591648.tar.bz2
[mlir] Make attributes mutable in Python bindings
Attributes represent additional data about an operation and are intended to be modifiable during the lifetime of the operation. In the dialect-specific Python bindings, attributes are exposed as properties on the operation class. Allow for assigning values to these properties. Also support creating new and deleting existing attributes through the generic "attributes" property of an operation. Any validity checking must be performed by the op verifier after the mutation, similarly to C++. Operations are not invalidated in the process: no dangling pointers can be created as all attributes are owned by the context and will remain live even if they are not used in any operation. Introduce a Python Test dialect by analogy with the Test dialect and to avoid polluting the latter with Python-specific constructs. Use this dialect to implement a test for the attribute access and mutation API. Reviewed By: stellaraccident, mehdi_amini Differential Revision: https://reviews.llvm.org/D91652
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions