Minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-09-28 23:45:00 +00:00
parent de65fb3a8b
commit ab4fa4f377

View File

@ -382,16 +382,18 @@ const Type *StructType::getTypeAtIndex(const Value *V) const {
//===----------------------------------------------------------------------===//
// Static 'Type' data
// Primitive 'Type' data
//===----------------------------------------------------------------------===//
#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
} \
static ManagedStatic<TY##Type> The##TY##Ty; \
Type *Type::TY##Ty = &*The##TY##Ty
namespace {
DeclarePrimType(Void, "void");
DeclarePrimType(Bool, "bool");
DeclarePrimType(SByte, "sbyte");
@ -405,21 +407,7 @@ namespace {
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;
#undef DeclarePrimType
//===----------------------------------------------------------------------===//