diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 20:56:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 20:56:46 +0000 |
commit | e74f3c0ce6c16908a8690824704f148ecaf7ddb1 (patch) | |
tree | 5ad027f0d59b8283acffd87d9d61d2a59e686bfc | |
parent | d6662add687f20cffa0755e410efbb40de4dcf23 (diff) |
Rename ConvertType to ConvertConstant to avoid a name conflict on llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78596 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Constants.h | 4 | ||||
-rw-r--r-- | lib/VMCore/ConstantsContext.h | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index a365949937..df13291922 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -38,7 +38,7 @@ class VectorType; template<class ConstantClass, class TypeClass, class ValType> struct ConstantCreator; template<class ConstantClass, class TypeClass> -struct ConvertType; +struct ConvertConstant; //===----------------------------------------------------------------------===// /// This is the shared class of boolean and integer constants. This class @@ -552,7 +552,7 @@ public: class ConstantExpr : public Constant { friend struct ConstantCreator<ConstantExpr,Type, std::pair<unsigned, std::vector<Constant*> > >; - friend struct ConvertType<ConstantExpr, Type>; + friend struct ConvertConstant<ConstantExpr, Type>; protected: ConstantExpr(const Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) diff --git a/lib/VMCore/ConstantsContext.h b/lib/VMCore/ConstantsContext.h index 4b08e04daf..2868f87fa4 100644 --- a/lib/VMCore/ConstantsContext.h +++ b/lib/VMCore/ConstantsContext.h @@ -340,7 +340,7 @@ struct ConstantCreator { }; template<class ConstantClass, class TypeClass> -struct ConvertType { +struct ConvertConstant { static void convert(ConstantClass *OldC, const TypeClass *NewTy) { llvm_unreachable("This type cannot be converted!"); } @@ -391,7 +391,7 @@ struct ConstantCreator<ConstantExpr, Type, ExprMapKeyType> { }; template<> -struct ConvertType<ConstantExpr, Type> { +struct ConvertConstant<ConstantExpr, Type> { static void convert(ConstantExpr *OldC, const Type *NewTy) { Constant *New; switch (OldC->getOpcode()) { @@ -451,7 +451,7 @@ struct ConstantCreator<MDNode, Type, std::vector<Value*> > { }; template<> -struct ConvertType<ConstantVector, VectorType> { +struct ConvertConstant<ConstantVector, VectorType> { static void convert(ConstantVector *OldC, const VectorType *NewTy) { // Make everyone now use a constant of the new type... std::vector<Constant*> C; @@ -465,7 +465,7 @@ struct ConvertType<ConstantVector, VectorType> { }; template<> -struct ConvertType<ConstantAggregateZero, Type> { +struct ConvertConstant<ConstantAggregateZero, Type> { static void convert(ConstantAggregateZero *OldC, const Type *NewTy) { // Make everyone now use a constant of the new type... Constant *New = ConstantAggregateZero::get(NewTy); @@ -476,7 +476,7 @@ struct ConvertType<ConstantAggregateZero, Type> { }; template<> -struct ConvertType<ConstantArray, ArrayType> { +struct ConvertConstant<ConstantArray, ArrayType> { static void convert(ConstantArray *OldC, const ArrayType *NewTy) { // Make everyone now use a constant of the new type... std::vector<Constant*> C; @@ -490,7 +490,7 @@ struct ConvertType<ConstantArray, ArrayType> { }; template<> -struct ConvertType<ConstantStruct, StructType> { +struct ConvertConstant<ConstantStruct, StructType> { static void convert(ConstantStruct *OldC, const StructType *NewTy) { // Make everyone now use a constant of the new type... std::vector<Constant*> C; @@ -513,7 +513,7 @@ struct ConstantCreator<ConstantPointerNull, PointerType, ValType> { }; template<> -struct ConvertType<ConstantPointerNull, PointerType> { +struct ConvertConstant<ConstantPointerNull, PointerType> { static void convert(ConstantPointerNull *OldC, const PointerType *NewTy) { // Make everyone now use a constant of the new type... Constant *New = ConstantPointerNull::get(NewTy); @@ -532,7 +532,7 @@ struct ConstantCreator<UndefValue, Type, ValType> { }; template<> -struct ConvertType<UndefValue, Type> { +struct ConvertConstant<UndefValue, Type> { static void convert(UndefValue *OldC, const Type *NewTy) { // Make everyone now use a constant of the new type. Constant *New = UndefValue::get(NewTy); @@ -757,7 +757,7 @@ public: // leaving will remove() itself, causing the AbstractTypeMapEntry to be // eliminated eventually. do { - ConvertType<ConstantClass, TypeClass>::convert( + ConvertConstant<ConstantClass, TypeClass>::convert( static_cast<ConstantClass *>(I->second->second), cast<TypeClass>(NewTy)); |