diff options
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r-- | include/llvm/Type.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 743a018..b029212 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -216,8 +216,9 @@ public: /// 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 |