diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-03 01:39:20 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-03 01:39:20 +0000 |
commit | 5f4ac848d94b0a92e19ac7f2b3d0284d7d323173 (patch) | |
tree | af81190be5b56edee3349ab035ca80c06e75b145 /lib/VMCore/LLVMContextImpl.h | |
parent | c0ff8c85dcc0bb3c58c15890b180dedaa726cb76 (diff) | |
download | llvm-5f4ac848d94b0a92e19ac7f2b3d0284d7d323173.tar.gz llvm-5f4ac848d94b0a92e19ac7f2b3d0284d7d323173.tar.bz2 llvm-5f4ac848d94b0a92e19ac7f2b3d0284d7d323173.tar.xz |
Now Bitcode reader bug is fixed. Reapply 80839.
Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.h')
-rw-r--r-- | lib/VMCore/LLVMContextImpl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index eeafeafd9e..1ee4ad737e 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/lib/VMCore/LLVMContextImpl.h @@ -19,6 +19,7 @@ #include "LeaksContext.h" #include "TypesContext.h" #include "llvm/LLVMContext.h" +#include "llvm/Metadata.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/System/Mutex.h" @@ -106,10 +107,12 @@ public: StringMap<MDString*> MDStringCache; + FoldingSet<MDNode> MDNodeSet; + ValueMap<char, Type, ConstantAggregateZero> AggZeroConstants; SmallPtrSet<const MDNode *, 8> MDNodes; - + typedef ValueMap<std::vector<Constant*>, ArrayType, ConstantArray, true /*largekey*/> ArrayConstantsTy; ArrayConstantsTy ArrayConstants; @@ -199,7 +202,6 @@ public: ArrayConstants.freeConstants(); StructConstants.freeConstants(); VectorConstants.freeConstants(); - AggZeroConstants.freeConstants(); NullPtrConstants.freeConstants(); UndefValueConstants.freeConstants(); |