mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Merging r168354, r168355 and r168379 into the 3.2 release branch.
Set of Attributes patches. Merging r168354: Make the AttrListPtr object a part of the LLVMContext. When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. Merging r168355: Merging r168379 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -97,11 +97,18 @@ LLVMContextImpl::~LLVMContextImpl() {
|
||||
|
||||
// Destroy attributes.
|
||||
for (FoldingSetIterator<AttributesImpl> I = AttrsSet.begin(),
|
||||
E = AttrsSet.end(); I != E;) {
|
||||
E = AttrsSet.end(); I != E; ) {
|
||||
FoldingSetIterator<AttributesImpl> Elem = I++;
|
||||
delete &*Elem;
|
||||
}
|
||||
|
||||
// Destroy attribute lists.
|
||||
for (FoldingSetIterator<AttributeListImpl> I = AttrsLists.begin(),
|
||||
E = AttrsLists.end(); I != E; ) {
|
||||
FoldingSetIterator<AttributeListImpl> Elem = I++;
|
||||
delete &*Elem;
|
||||
}
|
||||
|
||||
// Destroy MDNodes. ~MDNode can move and remove nodes between the MDNodeSet
|
||||
// and the NonUniquedMDNodes sets, so copy the values out first.
|
||||
SmallVector<MDNode*, 8> MDNodes;
|
||||
|
||||
Reference in New Issue
Block a user