[llvm-commits] Add eraseFromParent, releaseFromParent to GlobalValue (round 2)

Chris Lattner clattner at apple.com
Fri Aug 15 09:25:10 PDT 2008


On Aug 14, 2008, at 2:59 PM, Daniel Dunbar wrote:

> Now with a little more feeling.
>
> The attached patch adds eraseFromParent,releaseFromParent methods
> to GlobalValue while avoiding the overhead of making those methods  
> virtual
> on Function, GlobalAlias, and GlobalVariable.

Looks great to me.  One minor tweak: do you really need a virtual  
method for "erase"?  It should always be "delete removeFromParent()",  
so you could just put that in the generic GlobalValue case.

-Chris 



More information about the llvm-commits mailing list