diff options
author | River Riddle <riddleriver@gmail.com> | 2020-08-31 12:33:36 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-08-31 13:26:23 -0700 |
commit | 88c6e25e4f0630bd9204cb02787fcb67e097a43a (patch) | |
tree | ec09413a3c6858cabef0893a372fb684b1839946 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 61e15ecab50943d8e62add494ff35d1cd165758d (diff) | |
download | llvm-88c6e25e4f0630bd9204cb02787fcb67e097a43a.zip llvm-88c6e25e4f0630bd9204cb02787fcb67e097a43a.tar.gz llvm-88c6e25e4f0630bd9204cb02787fcb67e097a43a.tar.bz2 |
[mlir][OpFormatGen] Add support for specifiy "custom" directives.
This revision adds support for custom directives to the declarative assembly format. This allows for users to use C++ for printing and parsing subsections of an otherwise declaratively specified format. The custom directive is structured as follows:
```
custom-directive ::= `custom` `<` UserDirective `>` `(` Params `)`
```
`user-directive` is used as a suffix when this directive is used during printing and parsing. When parsing, `parseUserDirective` will be invoked. When printing, `printUserDirective` will be invoked. The first parameter to these methods must be a reference to either the OpAsmParser, or OpAsmPrinter. The type of rest of the parameters is dependent on the `Params` specified in the assembly format.
Differential Revision: https://reviews.llvm.org/D84719
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions