From 76934613e386bc15a38d17d2253685f1cd06a895 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 11 Sep 2008 11:30:19 +0000 Subject: [PATCH] Handle DM_NORETURN in ast2firm. [r21840] --- ast2firm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ast2firm.c b/ast2firm.c index 2cef5f9..7759ab3 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -1662,6 +1662,15 @@ static ir_node *call_expression_to_firm(const call_expression_t *call) result = new_d_Proj(dbgi, resproj, mode, 0); } + if (function->kind == EXPR_REFERENCE && + function->reference.declaration->modifiers & DM_NORETURN) { + /* A dead end: Keep the Call and the Block. Also place all further + * nodes into a new and unreachable block. */ + keep_alive(node); + keep_alive(get_cur_block()); + new_Block(0, NULL); + } + return result; } -- 2.20.1