[Mlir-commits] [mlir] [mlir][EmitC] Add `verbatim` op (PR #79584)
Marius Brehler
llvmlistbot at llvm.org
Fri Jan 26 04:49:11 PST 2024
================
@@ -166,3 +166,14 @@ func.func @test_for_not_index_induction(%arg0 : i16, %arg1 : i16, %arg2 : i16) {
}
return
}
+
+emitc.verbatim "#ifdef __cplusplus"
+emitc.verbatim "extern \"C\" {"
+emitc.verbatim "#endif // __cplusplus"
+
+emitc.verbatim "#ifdef __cplusplus"
+emitc.verbatim "} // extern \"C\""
+emitc.verbatim "#endif // __cplusplus"
+
+emitc.verbatim "typedef int32_t i32" {trailing_semicolon = unit}
+emitc.verbatim "typedef float f32" trailing_semicolon
----------------
marbre wrote:
Do you want to add one of those or even both to the example in the description?
https://github.com/llvm/llvm-project/pull/79584
More information about the Mlir-commits
mailing list