mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+14
-14
@@ -35,7 +35,7 @@ class DerivedType : public Type, public AbstractTypeUser {
|
||||
mutable std::vector<AbstractTypeUser *> AbstractTypeUsers;
|
||||
|
||||
protected:
|
||||
DerivedType(PrimitiveID id) : Type("", id) {}
|
||||
DerivedType(TypeID id) : Type("", id) {}
|
||||
~DerivedType() {
|
||||
assert(AbstractTypeUsers.empty());
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const FunctionType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == FunctionTyID;
|
||||
return T->getTypeID() == FunctionTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
///
|
||||
class CompositeType : public DerivedType {
|
||||
protected:
|
||||
inline CompositeType(PrimitiveID id) : DerivedType(id) { }
|
||||
inline CompositeType(TypeID id) : DerivedType(id) { }
|
||||
public:
|
||||
|
||||
/// getTypeAtIndex - Given an index value into the type, return the type of
|
||||
@@ -173,9 +173,9 @@ public:
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const CompositeType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == ArrayTyID ||
|
||||
T->getPrimitiveID() == StructTyID ||
|
||||
T->getPrimitiveID() == PointerTyID;
|
||||
return T->getTypeID() == ArrayTyID ||
|
||||
T->getTypeID() == StructTyID ||
|
||||
T->getTypeID() == PointerTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const StructType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == StructTyID;
|
||||
return T->getTypeID() == StructTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -248,7 +248,7 @@ class SequentialType : public CompositeType {
|
||||
SequentialType(const SequentialType &); // Do not implement!
|
||||
const SequentialType &operator=(const SequentialType &); // Do not implement!
|
||||
protected:
|
||||
SequentialType(PrimitiveID TID, const Type *ElType) : CompositeType(TID) {
|
||||
SequentialType(TypeID TID, const Type *ElType) : CompositeType(TID) {
|
||||
ContainedTys.reserve(1);
|
||||
ContainedTys.push_back(PATypeHandle(ElType, this));
|
||||
}
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
}
|
||||
virtual bool indexValid(const Value *V) const {
|
||||
const Type *Ty = V->getType();
|
||||
switch (Ty->getPrimitiveID()) {
|
||||
switch (Ty->getTypeID()) {
|
||||
case Type::IntTyID:
|
||||
case Type::UIntTyID:
|
||||
case Type::LongTyID:
|
||||
@@ -278,8 +278,8 @@ public:
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const SequentialType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == ArrayTyID ||
|
||||
T->getPrimitiveID() == PointerTyID;
|
||||
return T->getTypeID() == ArrayTyID ||
|
||||
T->getTypeID() == PointerTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const ArrayType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == ArrayTyID;
|
||||
return T->getTypeID() == ArrayTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
// Implement support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const PointerType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == PointerTyID;
|
||||
return T->getTypeID() == PointerTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
// Implement support for type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const OpaqueType *T) { return true; }
|
||||
static inline bool classof(const Type *T) {
|
||||
return T->getPrimitiveID() == OpaqueTyID;
|
||||
return T->getTypeID() == OpaqueTyID;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Type>(V) && classof(cast<Type>(V));
|
||||
|
||||
+11
-11
@@ -54,7 +54,7 @@ struct Type : public Value {
|
||||
/// Note: If you add an element to this, you need to add an element to the
|
||||
/// Type::getPrimitiveType function, or else things will break!
|
||||
///
|
||||
enum PrimitiveID {
|
||||
enum TypeID {
|
||||
VoidTyID = 0 , BoolTyID, // 0, 1: Basics...
|
||||
UByteTyID , SByteTyID, // 2, 3: 8 bit types...
|
||||
UShortTyID , ShortTyID, // 4, 5: 16 bit types...
|
||||
@@ -74,14 +74,14 @@ struct Type : public Value {
|
||||
//PackedTyID , // SIMD 'packed' format... TODO
|
||||
//...
|
||||
|
||||
NumPrimitiveIDs, // Must remain as last defined ID
|
||||
NumTypeIDs, // Must remain as last defined ID
|
||||
FirstDerivedTyID = FunctionTyID,
|
||||
};
|
||||
|
||||
private:
|
||||
PrimitiveID ID; // The current base type of this type...
|
||||
unsigned UID; // The unique ID number for this class
|
||||
bool Abstract; // True if type contains an OpaqueType
|
||||
TypeID ID; // The current base type of this type...
|
||||
unsigned UID; // The unique ID number for this class
|
||||
bool Abstract; // True if type contains an OpaqueType
|
||||
|
||||
/// RefCount - This counts the number of PATypeHolders that are pointing to
|
||||
/// this type. When this number falls to zero, if the type is abstract and
|
||||
@@ -93,7 +93,7 @@ private:
|
||||
const Type *getForwardedTypeInternal() const;
|
||||
protected:
|
||||
/// ctor is protected, so only subclasses can create Type objects...
|
||||
Type(const std::string &Name, PrimitiveID id);
|
||||
Type(const std::string &Name, TypeID id);
|
||||
virtual ~Type() {}
|
||||
|
||||
|
||||
@@ -137,10 +137,10 @@ public:
|
||||
// are defined in private classes defined in Type.cpp for primitive types.
|
||||
//
|
||||
|
||||
/// getPrimitiveID - Return the base type of the type. This will return one
|
||||
/// of the PrimitiveID enum elements defined above.
|
||||
/// getTypeID - Return the type id for the type. This will return one
|
||||
/// of the TypeID enum elements defined above.
|
||||
///
|
||||
inline PrimitiveID getPrimitiveID() const { return ID; }
|
||||
inline TypeID getTypeID() const { return ID; }
|
||||
|
||||
/// getUniqueID - Returns the UID of the type. This can be thought of as a
|
||||
/// small integer version of the pointer to the type class. Two types that
|
||||
@@ -259,7 +259,7 @@ public:
|
||||
//
|
||||
|
||||
/// getPrimitiveType/getUniqueIDType - Return a type based on an identifier.
|
||||
static const Type *getPrimitiveType(PrimitiveID IDNumber);
|
||||
static const Type *getPrimitiveType(TypeID IDNumber);
|
||||
static const Type *getUniqueIDType(unsigned UID);
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
@@ -394,7 +394,7 @@ template <> struct GraphTraits<const Type*> {
|
||||
};
|
||||
|
||||
template <> inline bool isa_impl<PointerType, Type>(const Type &Ty) {
|
||||
return Ty.getPrimitiveID() == Type::PointerTyID;
|
||||
return Ty.getTypeID() == Type::PointerTyID;
|
||||
}
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
Reference in New Issue
Block a user