[llvm-commits] [llvm] r55210 - in /llvm/trunk: include/llvm/ADT/FoldingSet.h lib/Support/FoldingSet.cpp

Dan Gohman gohman at apple.com
Fri Aug 22 19:12:25 PDT 2008


On Aug 22, 2008, at 6:54 PM, Chris Lattner wrote:

>
> On Aug 22, 2008, at 6:35 PM, Dan Gohman wrote:
>
>>
>> On Aug 22, 2008, at 6:07 PM, Chris Lattner wrote:
>>
>>>
>>> On Aug 22, 2008, at 5:42 PM, Dan Gohman wrote:
>>>
>>>> Author: djg
>>>> Date: Fri Aug 22 19:42:16 2008
>>>> New Revision: 55210
>>>>
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=55210&view=rev
>>>> Log:
>>>> Add a clear() method to FoldingSet.
>>>
>>> Does this delete the nodes in the folding set?
>>
>> No. It's my understanding that FoldingSet doesn't own the nodes.
>
> Hrm, I was pretty sure it did own the nodes, who else would?  However,
> the dtor isn't freeing them.  Are they all getting leaked?  What am I
> forgetting here?

Are you thinking of ilist? It does own its nodes, though there's a
way to remove them and reclaim ownership, and SelectionDAG uses it,
for example. SelectionDAG takes care of deaellocation of its nodes.

Dan




More information about the llvm-commits mailing list