[svn r248] Fixed: labels in inline asm block now work for the normal case.

Fixed: inline asm blocks are now emitted as a single asm entity.
This commit is contained in:
Tomas Lindquist Olsen
2008-06-08 06:15:51 +02:00
parent 3e62d80b4f
commit fd8cec14e1
9 changed files with 235 additions and 85 deletions

View File

@@ -41,6 +41,7 @@ struct CompoundStatement;
struct Argument;
struct StaticAssert;
struct AsmStatement;
struct AsmBlockStatement;
struct GotoStatement;
struct ScopeStatement;
struct TryCatchStatement;
@@ -90,6 +91,7 @@ struct Statement : Object
virtual TryCatchStatement *isTryCatchStatement() { return NULL; }
virtual GotoStatement *isGotoStatement() { return NULL; }
virtual AsmStatement *isAsmStatement() { return NULL; }
virtual AsmBlockStatement *isAsmBlockStatement() { return NULL; }
#ifdef _DH
int incontract;
#endif
@@ -754,7 +756,8 @@ struct LabelStatement : Statement
Statement *inlineScan(InlineScanState *iss);
void toIR(IRState *irs);
// LLVMDC
llvm::BasicBlock* llvmBB;
};
@@ -788,4 +791,13 @@ struct AsmStatement : Statement
void toIR(IRState *irs);
};
struct AsmBlockStatement : CompoundStatement
{
AsmBlockStatement(Loc loc, Statements *s);
Statements *flatten(Scope *sc);
AsmBlockStatement *isAsmBlockStatement() { return this; }
void toIR(IRState *irs);
};
#endif /* DMD_STATEMENT_H */