comparison 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
comparison
equal deleted inserted replaced
162:1856c62af24b 163:a8cd9bc1021a
150 150
151 void IfStatement::toIR(IRState* p) 151 void IfStatement::toIR(IRState* p)
152 { 152 {
153 Logger::println("IfStatement::toIR(): %s", loc.toChars()); 153 Logger::println("IfStatement::toIR(): %s", loc.toChars());
154 LOG_SCOPE; 154 LOG_SCOPE;
155
156 if (match)
157 {
158 llvm::Value* allocainst = new llvm::AllocaInst(DtoType(match->type), "._tmp_if_var", p->topallocapoint());
159 gIR->irDsymbol[match].irLocal = new IrLocal(match);
160 gIR->irDsymbol[match].irLocal->value = allocainst;
161 }
155 162
156 DValue* cond_e = condition->toElem(p); 163 DValue* cond_e = condition->toElem(p);
157 llvm::Value* cond_val = cond_e->getRVal(); 164 llvm::Value* cond_val = cond_e->getRVal();
158 delete cond_e; 165 delete cond_e;
159 166