Mesa (master): freedreno/ir3: Mark ir3_context_error() as NORETURN
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 18 18:57:16 UTC 2019
Module: Mesa
Branch: master
Commit: 18ce6ac6328db11bc68eb5689a28a43f7479cf7f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=18ce6ac6328db11bc68eb5689a28a43f7479cf7f
Author: Kristian H. Kristensen <hoegsberg at chromium.org>
Date: Wed Apr 10 13:06:39 2019 -0700
freedreno/ir3: Mark ir3_context_error() as NORETURN
Fixes a few warnings.
Signed-off-by: Kristian H. Kristensen <hoegsberg at chromium.org>
---
src/freedreno/ir3/ir3_context.c | 4 ++--
src/freedreno/ir3/ir3_context.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c
index d6267165ec7..f822e9e13e9 100644
--- a/src/freedreno/ir3/ir3_context.c
+++ b/src/freedreno/ir3/ir3_context.c
@@ -382,7 +382,7 @@ ir3_split_dest(struct ir3_block *block, struct ir3_instruction **dst,
}
}
-void
+NORETURN void
ir3_context_error(struct ir3_context *ctx, const char *format, ...)
{
struct hash_table *errors = NULL;
@@ -401,7 +401,7 @@ ir3_context_error(struct ir3_context *ctx, const char *format, ...)
nir_print_shader_annotated(ctx->s, stdout, errors);
ralloc_free(errors);
ctx->error = true;
- debug_assert(0);
+ unreachable("");
}
static struct ir3_instruction *
diff --git a/src/freedreno/ir3/ir3_context.h b/src/freedreno/ir3/ir3_context.h
index 81715f7fa11..5589386edfa 100644
--- a/src/freedreno/ir3/ir3_context.h
+++ b/src/freedreno/ir3/ir3_context.h
@@ -160,7 +160,7 @@ struct ir3_instruction * ir3_create_collect(struct ir3_context *ctx,
void ir3_split_dest(struct ir3_block *block, struct ir3_instruction **dst,
struct ir3_instruction *src, unsigned base, unsigned n);
-void ir3_context_error(struct ir3_context *ctx, const char *format, ...);
+NORETURN void ir3_context_error(struct ir3_context *ctx, const char *format, ...);
#define compile_assert(ctx, cond) do { \
if (!(cond)) ir3_context_error((ctx), "failed assert: "#cond"\n"); \
More information about the mesa-commit
mailing list