add some helper functions.
authorChris Lattner <sabre@nondot.org>
Mon, 5 Oct 2009 05:05:57 +0000 (05:05 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Oct 2009 05:05:57 +0000 (05:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83293 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Type.h

index 9c2fae0dfb57c4871b57dc3e6c6fe1e9d35b377e..f962a3f48419afbc77ab02b6af3b758e72038d8b 100644 (file)
@@ -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;