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 | 36309cd391e73ad4cd1fd48e209cd9da8ef40419 (patch) | |
tree | 452984b5031ca6bd9fcacd1ad1adcc8df9374ca3 /llvm/lib/VMCore/LLVMContextImpl.h | |
parent | f0da41c3e4d3c29b00cdda9f2601b245577e6b15 (diff) | |
download | bcm5719-llvm-36309cd391e73ad4cd1fd48e209cd9da8ef40419.tar.gz bcm5719-llvm-36309cd391e73ad4cd1fd48e209cd9da8ef40419.zip |
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.
llvm-svn: 80839
Diffstat (limited to 'llvm/lib/VMCore/LLVMContextImpl.h')
-rw-r--r-- | llvm/lib/VMCore/LLVMContextImpl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.h b/llvm/lib/VMCore/LLVMContextImpl.h index eeafeafd9ee..1ee4ad737e4 100644 --- a/llvm/lib/VMCore/LLVMContextImpl.h +++ b/llvm/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(); |