Make the AttrListPtr object a part of the LLVMContext.
authorBill Wendling <isanbard@gmail.com>
Tue, 20 Nov 2012 05:09:20 +0000 (05:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 20 Nov 2012 05:09:20 +0000 (05:09 +0000)
commitf86efb9b98faf36e1038a34327df2bdeea95f19a
treeaad015951d6304cd1409e1aad01fa39db8169821
parent9c1a86b29cfee575a9c8bc2e0e0b5349227d0b4f
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
12 files changed:
llvm/include/llvm/Attributes.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/lib/VMCore/Attributes.cpp
llvm/lib/VMCore/AttributesImpl.h
llvm/lib/VMCore/LLVMContextImpl.cpp
llvm/lib/VMCore/LLVMContextImpl.h
llvm/utils/TableGen/IntrinsicEmitter.cpp