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. llvm-svn: 168354
This commit is contained in:
@@ -487,7 +487,7 @@ bool BitcodeReader::ParseAttributeBlock() {
|
||||
Attributes::get(Context, B)));
|
||||
}
|
||||
|
||||
MAttributes.push_back(AttrListPtr::get(Attrs));
|
||||
MAttributes.push_back(AttrListPtr::get(Context, Attrs));
|
||||
Attrs.clear();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user