[Mlir-commits] [mlir] [MLIR] Add llvm (debug) attributes to CAPI (PR #83992)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Mar 6 01:35:58 PST 2024


================
@@ -225,12 +226,157 @@ static int testStructTypeCreation(MlirContext ctx) {
   return 0;
 }
 
+// CHECK-LABEL: testLLVMAttributes
+static void testLLVMAttributes(MlirContext ctx) {
+  fprintf(stderr, "testLLVMAttributes\n");
+
+  // CHECK: #llvm.linkage<internal>
+  mlirAttributeDump(mlirLLVMLinkageAttrGet(ctx, 0x1));
+  // CHECK: #llvm.cconv<ccc>
+  mlirAttributeDump(mlirLLVMCConvAttrGet(ctx, 0x0));
+  // CHECK: #llvm<comdat any>
+  mlirAttributeDump(mlirLLVMComdatAttrGet(ctx, 0x0));
----------------
ftynse wrote:

We shouldn't have magic numbers in the API...

https://github.com/llvm/llvm-project/pull/83992


More information about the Mlir-commits mailing list