diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-02 21:22:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-02 21:22:09 +0000 |
commit | 22d00c4b5b0845531feead561116ede02a7354b9 (patch) | |
tree | 2095f4e178aa362d18c25b07a42f5209bead3a9d /lib/VMCore/LLVMContextImpl.h | |
parent | b261a1986acd86bb414d8e9e190a4e15742efc44 (diff) | |
download | external_llvm-22d00c4b5b0845531feead561116ede02a7354b9.zip external_llvm-22d00c4b5b0845531feead561116ede02a7354b9.tar.gz external_llvm-22d00c4b5b0845531feead561116ede02a7354b9.tar.bz2 |
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@80839 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 eeafeaf..1ee4ad7 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(); |