diff gen/llvmhelpers.h @ 302:bef811104734 trunk

[svn r323] Branching out of inline asm works. Renamed emit_finallyblocks to DtoFinallyBlocks and moved to llvmhelpers. Added enclosingtryfinally to AsmBlockStatement, so branches out of asm blocks respect finallys. Refactored some GotoStatement code into DtoGoto.
author ChristianK
date Wed, 25 Jun 2008 20:39:09 +0200
parents 70c370e97944
children 2b72433d5c8c
line wrap: on
line diff
--- a/gen/llvmhelpers.h	Tue Jun 24 22:48:33 2008 +0200
+++ b/gen/llvmhelpers.h	Wed Jun 25 20:39:09 2008 +0200
@@ -1,6 +1,8 @@
 #ifndef LLVMDC_GEN_LLVMHELPERS_H
 #define LLVMDC_GEN_LLVMHELPERS_H
 
+#include "statement.h"
+
 // dynamic memory helpers
 LLValue* DtoNew(Type* newtype);
 void DtoDeleteMemory(LLValue* ptr);
@@ -11,6 +13,14 @@
 // assertion generator
 void DtoAssert(Loc* loc, DValue* msg);
 
+// emit goto
+void DtoGoto(Loc* loc, LabelDsymbol* target, TryFinallyStatement* enclosingtryfinally);
+
+// generates IR for finally blocks between the 'start' and 'end' statements
+// will begin with the finally block belonging to 'start' and does not include
+// the finally block of 'end'
+void DtoFinallyBlocks(TryFinallyStatement* start, TryFinallyStatement* end);
+
 // nested variable/class helpers
 LLValue* DtoNestedContext(FuncDeclaration* func);
 LLValue* DtoNestedVariable(VarDeclaration* vd);