Fixed a crash in DtoDefineFunction.

This commit is contained in:
Alexey Prokhin 2010-12-31 14:07:33 +03:00
parent 57866a8359
commit 16b0fe136e

View file

@ -846,7 +846,8 @@ void DtoDefineFunction(FuncDeclaration* fd)
// std::cout << *func << std::endl; // std::cout << *func << std::endl;
// erase alloca point // erase alloca point
allocaPoint->eraseFromParent(); if (allocaPoint->getParent())
allocaPoint->eraseFromParent();
allocaPoint = 0; allocaPoint = 0;
gIR->func()->allocapoint = 0; gIR->func()->allocapoint = 0;