aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Type.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-05 05:05:57 +0000
committerChris Lattner <sabre@nondot.org>2009-10-05 05:05:57 +0000
commit375c032468ed91991cb15edd415222815d91a3ca (patch)
tree94286f6637bdba17740a17e0ca67d2ff349face6 /include/llvm/Type.h
parent68a0603dc5d3d79cd4de2195e950af26c3380cd7 (diff)
downloadexternal_llvm-375c032468ed91991cb15edd415222815d91a3ca.zip
external_llvm-375c032468ed91991cb15edd415222815d91a3ca.tar.gz
external_llvm-375c032468ed91991cb15edd415222815d91a3ca.tar.bz2
add some helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Type.h')
-rw-r--r--include/llvm/Type.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index 9c2fae0..f962a3f 100644
--- a/include/llvm/Type.h
+++ b/include/llvm/Type.h
@@ -205,6 +205,12 @@ public:
bool isFloatingPoint() const { return ID == FloatTyID || ID == DoubleTyID ||
ID == X86_FP80TyID || ID == FP128TyID || ID == PPC_FP128TyID; }
+ /// isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type.
+ bool isFloatTy() const { return ID == FloatTyID; }
+
+ /// isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type.
+ bool isDoubleTy() const { return ID == DoubleTyID; }
+
/// isFPOrFPVector - Return true if this is a FP type or a vector of FP types.
///
bool isFPOrFPVector() const;