From 03236140fa4ef316a605717e090276d6a0d42828 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Tue, 27 Oct 2009 23:45:55 +0000 Subject: [PATCH] Rename lib/VMCore/ConstantsContext.h:ValueMap<> to ConstantUniqueMap<> to avoid colliding with llvm/ADT/ValueMap.h:ValueMap<>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85344 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ConstantsContext.h | 16 ++++++++-------- lib/VMCore/LLVMContextImpl.h | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/VMCore/ConstantsContext.h b/lib/VMCore/ConstantsContext.h index 526b4b1b7ee..11fc8021300 100644 --- a/lib/VMCore/ConstantsContext.h +++ b/lib/VMCore/ConstantsContext.h @@ -332,7 +332,7 @@ struct ExprMapKeyType { // The number of operands for each ConstantCreator::create method is // determined by the ConstantTraits template. // ConstantCreator - A class that is used to create constants by -// ValueMap*. This class should be partially specialized if there is +// ConstantUniqueMap*. This class should be partially specialized if there is // something strange that needs to be done to interface to the ctor for the // constant. // @@ -506,7 +506,7 @@ struct ConstantKeyData { template -class ValueMap : public AbstractTypeUser { +class ConstantUniqueMap : public AbstractTypeUser { public: typedef std::pair MapKey; typedef std::map MapTy; @@ -529,8 +529,8 @@ private: /// AbstractTypeMapTy AbstractTypeMap; - /// ValueMapLock - Mutex for this map. - sys::SmartMutex ValueMapLock; + /// ConstantUniqueMapLock - Mutex for this map. + sys::SmartMutex ConstantUniqueMapLock; public: // NOTE: This function is not locked. It is the caller's responsibility @@ -619,7 +619,7 @@ public: /// getOrCreate - Return the specified constant from the map, creating it if /// necessary. ConstantClass *getOrCreate(const TypeClass *Ty, const ValType &V) { - sys::SmartScopedLock Lock(ValueMapLock); + sys::SmartScopedLock Lock(ConstantUniqueMapLock); MapKey Lookup(Ty, V); ConstantClass* Result = 0; @@ -674,7 +674,7 @@ public: } void remove(ConstantClass *CP) { - sys::SmartScopedLock Lock(ValueMapLock); + sys::SmartScopedLock Lock(ConstantUniqueMapLock); typename MapTy::iterator I = FindExistingElement(CP); assert(I != Map.end() && "Constant not found in constant table!"); assert(I->second == CP && "Didn't find correct element?"); @@ -725,7 +725,7 @@ public: } void refineAbstractType(const DerivedType *OldTy, const Type *NewTy) { - sys::SmartScopedLock Lock(ValueMapLock); + sys::SmartScopedLock Lock(ConstantUniqueMapLock); typename AbstractTypeMapTy::iterator I = AbstractTypeMap.find(OldTy); assert(I != AbstractTypeMap.end() && @@ -778,7 +778,7 @@ public: } void dump() const { - DEBUG(errs() << "Constant.cpp: ValueMap\n"); + DEBUG(errs() << "Constant.cpp: ConstantUniqueMap\n"); } }; diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index 84902d53559..68bd01f1ef4 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/lib/VMCore/LLVMContextImpl.h @@ -108,25 +108,25 @@ public: FoldingSet MDNodeSet; - ValueMap AggZeroConstants; + ConstantUniqueMap AggZeroConstants; - typedef ValueMap, ArrayType, + typedef ConstantUniqueMap, ArrayType, ConstantArray, true /*largekey*/> ArrayConstantsTy; ArrayConstantsTy ArrayConstants; - typedef ValueMap, StructType, - ConstantStruct, true /*largekey*/> StructConstantsTy; + typedef ConstantUniqueMap, StructType, + ConstantStruct, true /*largekey*/> StructConstantsTy; StructConstantsTy StructConstants; - typedef ValueMap, VectorType, - ConstantVector> VectorConstantsTy; + typedef ConstantUniqueMap, VectorType, + ConstantVector> VectorConstantsTy; VectorConstantsTy VectorConstants; - ValueMap NullPtrConstants; + ConstantUniqueMap NullPtrConstants; - ValueMap UndefValueConstants; + ConstantUniqueMap UndefValueConstants; - ValueMap ExprConstants; + ConstantUniqueMap ExprConstants; ConstantInt *TheTrueVal; ConstantInt *TheFalseVal;