From: Christoph Mallon Date: Thu, 11 Sep 2008 11:30:19 +0000 (+0000) Subject: Handle DM_NORETURN in ast2firm. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=76934613e386bc15a38d17d2253685f1cd06a895;p=cparser Handle DM_NORETURN in ast2firm. [r21840] --- 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; }