Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.145 -> 1.146 --- Log message: Minor cleanups --- Diffs of the changes: (+24 -36) Type.cpp | 60 ++++++++++++++++++++++++------------------------------------ 1 files changed, 24 insertions(+), 36 deletions(-) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.145 llvm/lib/VMCore/Type.cpp:1.146 --- llvm/lib/VMCore/Type.cpp:1.145 Thu Sep 28 18:38:07 2006 +++ llvm/lib/VMCore/Type.cpp Thu Sep 28 18:45:00 2006 @@ -382,44 +382,32 @@ //===----------------------------------------------------------------------===// -// Static 'Type' data +// Primitive 'Type' data //===----------------------------------------------------------------------===// -#define DeclarePrimType(TY, Str) \ - struct VISIBILITY_HIDDEN TY##Type : public Type { \ - TY##Type() : Type(Str, Type::TY##TyID) {} \ - }; \ - static ManagedStatic<TY##Type> The##TY##Ty - -namespace { - DeclarePrimType(Void, "void"); - DeclarePrimType(Bool, "bool"); - DeclarePrimType(SByte, "sbyte"); - DeclarePrimType(UByte, "ubyte"); - DeclarePrimType(Short, "short"); - DeclarePrimType(UShort, "ushort"); - DeclarePrimType(Int, "int"); - DeclarePrimType(UInt, "uint"); - DeclarePrimType(Long, "long"); - DeclarePrimType(ULong, "ulong"); - DeclarePrimType(Float, "float"); - DeclarePrimType(Double, "double"); - DeclarePrimType(Label, "label"); -} - -Type *Type::VoidTy = &*TheVoidTy; -Type *Type::BoolTy = &*TheBoolTy; -Type *Type::SByteTy = &*TheSByteTy; -Type *Type::UByteTy = &*TheUByteTy; -Type *Type::ShortTy = &*TheShortTy; -Type *Type::UShortTy = &*TheUShortTy; -Type *Type::IntTy = &*TheIntTy; -Type *Type::UIntTy = &*TheUIntTy; -Type *Type::LongTy = &*TheLongTy; -Type *Type::ULongTy = &*TheULongTy; -Type *Type::FloatTy = &*TheFloatTy; -Type *Type::DoubleTy = &*TheDoubleTy; -Type *Type::LabelTy = &*TheLabelTy; +#define DeclarePrimType(TY, Str) \ + namespace { \ + struct VISIBILITY_HIDDEN TY##Type : public Type { \ + TY##Type() : Type(Str, Type::TY##TyID) {} \ + }; \ + } \ + static ManagedStatic<TY##Type> The##TY##Ty; \ + Type *Type::TY##Ty = &*The##TY##Ty + +DeclarePrimType(Void, "void"); +DeclarePrimType(Bool, "bool"); +DeclarePrimType(SByte, "sbyte"); +DeclarePrimType(UByte, "ubyte"); +DeclarePrimType(Short, "short"); +DeclarePrimType(UShort, "ushort"); +DeclarePrimType(Int, "int"); +DeclarePrimType(UInt, "uint"); +DeclarePrimType(Long, "long"); +DeclarePrimType(ULong, "ulong"); +DeclarePrimType(Float, "float"); +DeclarePrimType(Double, "double"); +DeclarePrimType(Label, "label"); +#undef DeclarePrimType //===----------------------------------------------------------------------===// _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits