[Mlir-commits] [mlir] bf5c862 - Move MlirStringCallback declaration from mlir-c/IR.h to mlir-c/Support.h (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Nov 4 10:46:49 PST 2020
Author: Mehdi Amini
Date: 2020-11-04T18:46:36Z
New Revision: bf5c8625c48c34bfdf141616587ab58af90bb587
URL: https://github.com/llvm/llvm-project/commit/bf5c8625c48c34bfdf141616587ab58af90bb587
DIFF: https://github.com/llvm/llvm-project/commit/bf5c8625c48c34bfdf141616587ab58af90bb587.diff
LOG: Move MlirStringCallback declaration from mlir-c/IR.h to mlir-c/Support.h (NFC)
This is a generic utility that can be reused beyond the IR bindings.
Differential Revision: https://reviews.llvm.org/D90736
Added:
Modified:
mlir/include/mlir-c/IR.h
mlir/include/mlir-c/Support.h
Removed:
################################################################################
diff --git a/mlir/include/mlir-c/IR.h b/mlir/include/mlir-c/IR.h
index 608f04be770c..0a264ed25afe 100644
--- a/mlir/include/mlir-c/IR.h
+++ b/mlir/include/mlir-c/IR.h
@@ -74,17 +74,6 @@ struct MlirNamedAttribute {
};
typedef struct MlirNamedAttribute MlirNamedAttribute;
-/** A callback for returning string references.
- *
- * This function is called back by the functions that need to return a reference
- * to the portion of the string with the following arguments:
- * - a pointer to the beginning of a string;
- * - the length of the string (the pointer may point to a larger buffer, not
- * necessarily null-terminated);
- * - a pointer to user data forwarded from the printing call.
- */
-typedef void (*MlirStringCallback)(const char *, intptr_t, void *);
-
//===----------------------------------------------------------------------===//
// Context API.
//===----------------------------------------------------------------------===//
diff --git a/mlir/include/mlir-c/Support.h b/mlir/include/mlir-c/Support.h
index 98c0a200aab3..4bd500016390 100644
--- a/mlir/include/mlir-c/Support.h
+++ b/mlir/include/mlir-c/Support.h
@@ -50,6 +50,17 @@ inline MlirStringRef mlirStringRefCreate(const char *str, size_t length) {
*/
MlirStringRef mlirStringRefCreateFromCString(const char *str);
+/** A callback for returning string references.
+ *
+ * This function is called back by the functions that need to return a reference
+ * to the portion of the string with the following arguments:
+ * - a pointer to the beginning of a string;
+ * - the length of the string (the pointer may point to a larger buffer, not
+ * necessarily null-terminated);
+ * - a pointer to user data forwarded from the printing call.
+ */
+typedef void (*MlirStringCallback)(const char *, intptr_t, void *);
+
//===----------------------------------------------------------------------===//
// MlirLogicalResult.
//===----------------------------------------------------------------------===//
More information about the Mlir-commits
mailing list