diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-07 19:34:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-07 19:34:20 +0000 |
commit | f7f74c22b1470aa62e891010fc1fb9f7879ab232 (patch) | |
tree | 2442e799f89cf5059c517a1a81e509faedd28354 /include | |
parent | dfe327f749337906c2a60d807ac24b47caaf6273 (diff) | |
download | llvm-f7f74c22b1470aa62e891010fc1fb9f7879ab232.tar.gz llvm-f7f74c22b1470aa62e891010fc1fb9f7879ab232.tar.bz2 llvm-f7f74c22b1470aa62e891010fc1fb9f7879ab232.tar.xz |
Remove the notion of primitive types.
They were out of place since the introduction of arbitrary precision integer
types.
This also synchronizes the documentation to Types.h, so it refers to first class
types and single value types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/IR/Type.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/include/llvm/IR/Type.h b/include/llvm/IR/Type.h index 730c4fe30a..5773b6717c 100644 --- a/include/llvm/IR/Type.h +++ b/include/llvm/IR/Type.h @@ -71,10 +71,7 @@ public: StructTyID, ///< 12: Structures ArrayTyID, ///< 13: Arrays PointerTyID, ///< 14: Pointers - VectorTyID, ///< 15: SIMD 'packed' format, or other vector type - - LastPrimitiveTyID = X86_MMXTyID, - FirstDerivedTyID = IntegerTyID + VectorTyID ///< 15: SIMD 'packed' format, or other vector type }; private: @@ -239,12 +236,6 @@ public: /// elements or all its elements are empty. bool isEmptyTy() const; - /// Here are some useful little methods to query what type derived types are - /// Note that all other types can just compare to see if this == Type::xxxTy; - /// - bool isPrimitiveType() const { return getTypeID() <= LastPrimitiveTyID; } - bool isDerivedType() const { return getTypeID() >= FirstDerivedTyID; } - /// isFirstClassType - Return true if the type is "first class", meaning it /// is a valid type for a Value. /// @@ -257,9 +248,8 @@ public: /// and array types. /// bool isSingleValueType() const { - return (getTypeID() != VoidTyID && isPrimitiveType()) || - getTypeID() == IntegerTyID || getTypeID() == PointerTyID || - getTypeID() == VectorTyID; + return isFloatingPointTy() || isX86_MMXTy() || isIntegerTy() || + isPointerTy() || isVectorTy(); } /// isAggregateType - Return true if the type is an aggregate type. This |