David Greene via llvm-dev
2018-Nov-27 15:44 UTC
[llvm-dev] GlobalVariable::eraseFromParent
I am confused by GlobalVariable::eraseFromParent's declaration:
/// This method unlinks 'this' from the containing module and deletes
it.
void eraseFromParent();
In Globals.cpp the unlinking is done and SymbolTableListTraits cleans up
the symbol table but I don't see anything that actually deletes the
object. Is the comment misleading or am I missing something?
-David
Reid Kleckner via llvm-dev
2018-Nov-27 18:28 UTC
[llvm-dev] GlobalVariable::eraseFromParent
Deletion is taken care of by ilist_alloc_traits<T>::deleteNode. On Tue, Nov 27, 2018 at 7:45 AM David Greene via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I am confused by GlobalVariable::eraseFromParent's declaration: > > /// This method unlinks 'this' from the containing module and deletes it. > void eraseFromParent(); > > In Globals.cpp the unlinking is done and SymbolTableListTraits cleans up > the symbol table but I don't see anything that actually deletes the > object. Is the comment misleading or am I missing something? > > -David > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181127/ae512fc7/attachment.html>
David Greene via llvm-dev
2018-Nov-27 20:34 UTC
[llvm-dev] GlobalVariable::eraseFromParent
Thanks. I realized I was looking at ilist instead of iplist. :-/
-David
Reid Kleckner <rnk at google.com> writes:
> Deletion is taken care of by ilist_alloc_traits<T>::deleteNode.
>
> On Tue, Nov 27, 2018 at 7:45 AM David Greene via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>
> I am confused by GlobalVariable::eraseFromParent's declaration:
>
> /// This method unlinks 'this' from the containing module and
> deletes it.
> void eraseFromParent();
>
> In Globals.cpp the unlinking is done and SymbolTableListTraits
> cleans up
> the symbol table but I don't see anything that actually deletes
> the
> object. Is the comment misleading or am I missing something?
>
> -David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Seemingly Similar Threads
- Heap problems with 3.8.0rc2 in combination with vs2015 sp1
- Heap problems with 3.8.0rc2 in combination with vs2015 sp1
- Heap problems with 3.8.0rc2 in combination with vs2015 sp1
- Heap problems with 3.8.0rc2 in combination with vs2015 sp1
- Heap problems with 3.8.0rc2 in combination with vs2015 sp1