mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 17:06:15 +00:00
It turns out there are only 3 non-first-class type kinds left now, so
it's simpler for isFirstClassType to use a negative test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a834fcaebb
commit
2d0a77a1a4
@ -216,8 +216,9 @@ public:
|
|||||||
/// is a valid type for a Value.
|
/// is a valid type for a Value.
|
||||||
///
|
///
|
||||||
inline bool isFirstClassType() const {
|
inline bool isFirstClassType() const {
|
||||||
return isSingleValueType() ||
|
// There are more first-class kinds than non-first-class kinds, so a
|
||||||
ID == StructTyID || ID == ArrayTyID;
|
// negative test is simpler than a positive one.
|
||||||
|
return ID != FunctionTyID && ID != VoidTyID && ID != OpaqueTyID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isSingleValueType - Return true if the type is a valid type for a
|
/// isSingleValueType - Return true if the type is a valid type for a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user