[LLVMdev] Branching to Entry block
Misha Brukman
brukman at uiuc.edu
Thu Feb 17 11:21:46 PST 2005
On Thu, Feb 17, 2005 at 01:22:22PM -0600, Chris Lattner wrote:
> // Approach number 2, the more explicit way:
> BB->getParent()->getInstList().erase(BB); // Remove from list & delete
>
> // Approach number 3, remove from the list, then delete it explicitly:
> BB->getParent()->getInstList().remove(BB); // Just remove from list
> delete BB; // Delete block
Minor correction there: replace "getInstList()" with
"getBasicBlockList()". The former is only applicable to BasicBlocks,
the latter to Functions.
--
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
More information about the llvm-dev
mailing list