diff options
author | Timothy Arceri <[email protected]> | 2018-04-10 14:34:26 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-04-27 10:18:47 +1000 |
commit | 79b0556f292b813c4c7139f75cf0c9c6e2d3e7bb (patch) | |
tree | dde7b1d18dc4a8f155b14cd2bbd21598284b8149 /src | |
parent | 410f901beed8f6f041716396b1f27fd61518e231 (diff) |
glsl: replace some asserts with unreachable when processing the ast
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 94ce3c45d03..3bf581571e2 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -1397,8 +1397,7 @@ ast_expression::do_hir(exec_list *instructions, switch (this->oper) { case ast_aggregate: - assert(!"ast_aggregate: Should never get here."); - break; + unreachable("ast_aggregate: Should never get here."); case ast_assign: { this->subexpressions[0]->set_is_lhs(true); @@ -1974,15 +1973,13 @@ ast_expression::do_hir(exec_list *instructions, } case ast_unsized_array_dim: - assert(!"ast_unsized_array_dim: Should never get here."); - break; + unreachable("ast_unsized_array_dim: Should never get here."); case ast_function_call: /* Should *NEVER* get here. ast_function_call should always be handled * by ast_function_expression::hir. */ - assert(0); - break; + unreachable("ast_function_call: handled elsewhere "); case ast_identifier: { /* ast_identifier can appear several places in a full abstract syntax |