[cfe-commits] r89450 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
Eli Friedman
eli.friedman at gmail.com
Sun Nov 22 21:02:21 PST 2009
On Sun, Nov 22, 2009 at 12:01 AM, Daniel Dunbar <daniel at zuster.org> wrote:
>> @@ -38,7 +38,13 @@
>> I = CGRecordLayouts.begin(), E = CGRecordLayouts.end();
>> I != E; ++I)
>> delete I->second;
>> - CGRecordLayouts.clear();
>> + {
>> + llvm::FoldingSet<CGFunctionInfo>::iterator
>> + I = FunctionInfos.begin(), E = FunctionInfos.end();
>> + while (I != E)
>> + delete &*I++;
>> + }
>
> This isn't invalidating the infos, it could be a standard for loop?
FoldingSets are intrusive; the ++ operator accesses the current
element pointed to by the iterator. This structure is based off a
similar loop in ASTContext.
-Eli
More information about the cfe-commits
mailing list