File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -357,12 +357,15 @@ class LogBeforeAbort {
357357#define LITERT_CHECK_STATUS_OK (expr ) \
358358 LITERT_CHECK_STATUS_HAS_CODE (expr, kLiteRtStatusOk );
359359
360- #define LITERT_ENSURE_SUPPORTED (cond, msg ) \
361- if (!(cond)) { \
362- LITERT_LOG (LITERT_ERROR, " %s" , msg); \
363- return kLiteRtStatusErrorUnsupported ; \
360+ #define LITERT_ENSURE (cond, status , msg ) \
361+ if (!(cond)) { \
362+ LITERT_LOG (LITERT_ERROR, " %s" , msg); \
363+ return status; \
364364 }
365365
366+ #define LITERT_ENSURE_SUPPORTED (cond, msg ) \
367+ LITERT_ENSURE (cond, kLiteRtStatusErrorUnsupported , msg);
368+
366369#define LITERT_RETURN_IF_ERROR_OR_NOT_MATCHED (expr ) \
367370 if (LiteRtStatus status = expr; \
368371 (status != kLiteRtStatusOk && status != kLiteRtStatusLegalizeNoMatch )) \
You can’t perform that action at this time.
0 commit comments