hanchenye-llvm-project/mlir
Markus Böck a96911c49b [mlir] Escape strings of opaque attributes
Opaque attributes that currently contain string literals can't currently be properly roundtripped as they are not printed as escaped strings. This leads to incorrect tokens being generated and the parser to almost certainly fail. This patch simply uses llvm::printEscapedString from LLVM. It escapes all non printable characters and quotes to \xx hex literals, and backslashes to two backslashes. This syntax is supported by MLIRs Lexer as well. The same function is also currently in use for the same purpose in printSymbolReference, printAttribute for StringAttr and many more in AsmPrinter.cpp.

Differential Revision: https://reviews.llvm.org/D105405
2021-07-05 12:13:36 +02:00
..
cmake/modules [mlir] Generare .cpp.inc files for dialects. 2021-06-29 20:10:30 +00:00
docs [mlir][linalg][python] Update integration of OpDSL doc (NFC). 2021-07-01 07:41:32 +00:00
examples [mlir] Generare .cpp.inc files for dialects. 2021-06-29 20:10:30 +00:00
include [mlir-reduce] Improve diagnostic message and clean build dependency 2021-07-05 10:15:35 +08:00
lib [mlir] Escape strings of opaque attributes 2021-07-05 12:13:36 +02:00
python [mlir][linalg][python] Add min operation in OpDSL. 2021-07-02 16:27:30 +00:00
test [mlir] Escape strings of opaque attributes 2021-07-05 12:13:36 +02:00
tools [mlir-reduce] Improve diagnostic message and clean build dependency 2021-07-05 10:15:35 +08:00
unittests [MLIR] FlatAffineConstraints: Use Matrix objects to store the constraints 2021-07-01 22:05:31 +05:30
utils [vscode-mlir] Add support for restarting the server on setting/server changes 2021-06-29 00:08:44 +00:00
.clang-format
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
CMakeLists.txt [MLIR] Drop old cmake var names 2021-05-24 15:30:01 +05:30
LICENSE.TXT
README.md

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.