[Mesa-dev] [PATCH 01/10] glsl: replace some asserts with unreachable when processing the ast
Matt Turner
mattst88 at gmail.com
Thu Apr 26 18:20:40 UTC 2018
On Mon, Apr 9, 2018 at 9:34 PM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> ---
> src/compiler/glsl/ast_to_hir.cpp | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
> index 168ab7eec2f..4d7383c580f 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -1396,7 +1396,7 @@ ast_expression::do_hir(exec_list *instructions,
>
> switch (this->oper) {
> case ast_aggregate:
> - assert(!"ast_aggregate: Should never get here.");
> + unreachable("ast_aggregate: Should never get here.");
> break;
>
> case ast_assign: {
> @@ -1973,14 +1973,14 @@ ast_expression::do_hir(exec_list *instructions,
> }
>
> case ast_unsized_array_dim:
> - assert(!"ast_unsized_array_dim: Should never get here.");
> + unreachable("ast_unsized_array_dim: Should never get here.");
> break;
>
> case ast_function_call:
> /* Should *NEVER* get here. ast_function_call should always be handled
> * by ast_function_expression::hir.
> */
> - assert(0);
> + unreachable("ast_function_call: handled elsewhere ");
> break;
>
> case ast_identifier: {
> --
> 2.17.0
Remove the now unnecessary breaks and have a
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list