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
/// is a valid type for a Value.
///
inline bool isFirstClassType() const {
- return isSingleValueType() ||
- ID == StructTyID || ID == ArrayTyID;
+ // There are more first-class kinds than non-first-class kinds, so a
+ // 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