Mercurial > projects > ldc
diff gen/statements.cpp @ 163:a8cd9bc1021a trunk
[svn r179] lots and lots of fixes, much more of tango now compiles/works.
author | lindquist |
---|---|
date | Mon, 05 May 2008 07:36:29 +0200 |
parents | ccd07d9f2ce9 |
children | db9890b3fb64 |
line wrap: on
line diff
--- a/gen/statements.cpp Mon May 05 00:56:53 2008 +0200 +++ b/gen/statements.cpp Mon May 05 07:36:29 2008 +0200 @@ -153,6 +153,13 @@ Logger::println("IfStatement::toIR(): %s", loc.toChars()); LOG_SCOPE; + if (match) + { + llvm::Value* allocainst = new llvm::AllocaInst(DtoType(match->type), "._tmp_if_var", p->topallocapoint()); + gIR->irDsymbol[match].irLocal = new IrLocal(match); + gIR->irDsymbol[match].irLocal->value = allocainst; + } + DValue* cond_e = condition->toElem(p); llvm::Value* cond_val = cond_e->getRVal(); delete cond_e;