Assert in llvm-2.7

Hi All,

We have this piece of code in our system , where we are iteratively remove functions that we scan the cfg and mark as unreachable.
We observe that with llvm-2.6 func->eraseFromParent() works but with llvm-2.7 we get a the following assert.

An asserting value handle still pointed to this value!
UNREACHABLE executed at llvm-2.7/lib/VMCore/Value.cpp:522!

CODE