Mercurial > projects > ldc
diff gen/statements.cpp @ 232:092468448d25 trunk
[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.
author | lindquist |
---|---|
date | Sun, 08 Jun 2008 06:15:51 +0200 |
parents | 761c8352f494 |
children | 76ee1bbe487e |
line wrap: on
line diff
--- a/gen/statements.cpp Sun Jun 08 01:07:58 2008 +0200 +++ b/gen/statements.cpp Sun Jun 08 06:15:51 2008 +0200 @@ -992,6 +992,17 @@ Logger::println("LabelStatement::toIR(): %s", loc.toChars()); LOG_SCOPE; + // if it's an inline asm label, we don't create a basicblock, just emit it in the asm + if (p->inASM) + { + IRAsmStmt* a = new IRAsmStmt; + a->code = ".LDASM"; + a->code += ident->toChars(); + a->code += ":"; + p->ASMs.push_back(a); + return; + } + assert(tf == NULL); llvm::BasicBlock* oldend = gIR->scopeend();