[Mlir-commits] [mlir] ebe12df - Fix linkage error on mlirLogicalResultIsFailure.
Stella Laurenzo
llvmlistbot at llvm.org
Tue Nov 3 22:47:49 PST 2020
Author: Stella Laurenzo
Date: 2020-11-03T22:47:07-08:00
New Revision: ebe12df896528a15c237f18dbdf8d24e9ec527ea
URL: https://github.com/llvm/llvm-project/commit/ebe12df896528a15c237f18dbdf8d24e9ec527ea
DIFF: https://github.com/llvm/llvm-project/commit/ebe12df896528a15c237f18dbdf8d24e9ec527ea.diff
LOG: Fix linkage error on mlirLogicalResultIsFailure.
* For C, this needs to be inline static like the others.
Differential Revision: https://reviews.llvm.org/D90740
Added:
Modified:
mlir/include/mlir-c/Support.h
Removed:
################################################################################
diff --git a/mlir/include/mlir-c/Support.h b/mlir/include/mlir-c/Support.h
index accf6cc0eab8..d3be9a30f660 100644
--- a/mlir/include/mlir-c/Support.h
+++ b/mlir/include/mlir-c/Support.h
@@ -65,12 +65,12 @@ struct MlirLogicalResult {
typedef struct MlirLogicalResult MlirLogicalResult;
/** Checks if the given logical result represents a success. */
-inline int mlirLogicalResultIsSuccess(MlirLogicalResult res) {
+inline static int mlirLogicalResultIsSuccess(MlirLogicalResult res) {
return res.value != 0;
}
/** Checks if the given logical result represents a failure. */
-inline int mlirLogicalResultIsFailure(MlirLogicalResult res) {
+inline static int mlirLogicalResultIsFailure(MlirLogicalResult res) {
return res.value == 0;
}
More information about the Mlir-commits
mailing list