Files
clang-p2996/mlir/test/Target/Cpp/attrs.mlir
Simon Camphausen 1b79efdc72 [mlir] Fix printing of EmitC attrs/types with escape characters
Attributes and types were not escaped when printing.

Reviewed By: jpienaar, marbre

Differential Revision: https://reviews.llvm.org/D109143
2021-09-15 18:15:38 +00:00

11 lines
351 B
MLIR

// RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s
// CHECK-LABEL: void opaque_attrs() {
func @opaque_attrs() {
// CHECK-NEXT: f(OPAQUE_ENUM_VALUE);
emitc.call "f"() {args = [#emitc.opaque<"OPAQUE_ENUM_VALUE">]} : () -> ()
// CHECK-NEXT: f("some string");
emitc.call "f"() {args = [#emitc.opaque<"\"some string\"">]} : () -> ()
return
}