Mercurial > projects > ldc
comparison gen/statements.cpp @ 181:ef4108f34db6 trunk
[svn r197] Fixed: empty scope statement segfaulted.
author | lindquist |
---|---|
date | Wed, 07 May 2008 19:34:41 +0200 |
parents | c44e6a711885 |
children | 89e21eeaf4c4 |
comparison
equal
deleted
inserted
replaced
180:90522b72128a | 181:ef4108f34db6 |
---|---|
221 } | 221 } |
222 llvm::BasicBlock* endbb = new llvm::BasicBlock("endscope", p->topfunc(), oldend); | 222 llvm::BasicBlock* endbb = new llvm::BasicBlock("endscope", p->topfunc(), oldend); |
223 | 223 |
224 gIR->scope() = IRScope(beginbb, endbb); | 224 gIR->scope() = IRScope(beginbb, endbb); |
225 | 225 |
226 statement->toIR(p); | 226 if (statement) |
227 statement->toIR(p); | |
227 | 228 |
228 p->scope() = IRScope(p->scopebb(),oldend); | 229 p->scope() = IRScope(p->scopebb(),oldend); |
229 endbb->eraseFromParent(); | 230 endbb->eraseFromParent(); |
230 } | 231 } |
231 | 232 |