mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add a Type::isSingleValueType method. This will be used by code
that currently uses Type::isFirstClassType and depends on it returning false for struct or array types. This commit doesn't change the behavior of Type::isFirstClassType. llvm-svn: 51396
This commit is contained in:
parent
8e02953de8
commit
2804408839
@ -212,9 +212,19 @@ public:
|
|||||||
inline bool isPrimitiveType() const { return ID <= LastPrimitiveTyID; }
|
inline bool isPrimitiveType() const { return ID <= LastPrimitiveTyID; }
|
||||||
inline bool isDerivedType() const { return ID >= FirstDerivedTyID; }
|
inline bool isDerivedType() const { return ID >= FirstDerivedTyID; }
|
||||||
|
|
||||||
/// isFirstClassType - Return true if the value is holdable in a register.
|
/// isFirstClassType - Return true if the type is "first class", meaning it
|
||||||
|
/// is a valid type for a Value.
|
||||||
///
|
///
|
||||||
inline bool isFirstClassType() const {
|
inline bool isFirstClassType() const {
|
||||||
|
// Coming soon: first-class struct and array types...
|
||||||
|
return isSingleValueType();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// isSingleValueType - Return true if the type is a valid type for a
|
||||||
|
/// virtual register in codegen. This includes all first-class types
|
||||||
|
/// except struct and array types.
|
||||||
|
///
|
||||||
|
inline bool isSingleValueType() const {
|
||||||
return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
|
return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
|
||||||
ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID;
|
ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user