From: Bas Nieuwenhuizen Date: Fri, 20 Jul 2018 17:54:56 +0000 (+0200) Subject: nir: Fix end of function without return warning/error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1febbefe84374cb18f724bb289382a8aa6a3539;p=mesa.git nir: Fix end of function without return warning/error. There always is a continue block, so let us just do unreachable. Reviewed-by: Jason Ekstrand Fixes: 8cacf38f527 "nir: Do not use continue block after removing it." CC: 18.1 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107312 --- diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c index 49ba5de09e9..b3d0bf1decb 100644 --- a/src/compiler/nir/nir_opt_if.c +++ b/src/compiler/nir/nir_opt_if.c @@ -44,6 +44,8 @@ find_continue_block(nir_loop *loop) if (pred_entry->key != prev_block) return (nir_block*)pred_entry->key; } + + unreachable("Continue block not found!"); } /**