[llvm-commits] [llvm] r83293 - /llvm/trunk/include/llvm/Type.h

Chris Lattner sabre at nondot.org
Sun Oct 4 22:05:58 PDT 2009


Author: lattner
Date: Mon Oct  5 00:05:57 2009
New Revision: 83293

URL: http://llvm.org/viewvc/llvm-project?rev=83293&view=rev
Log:
add some helper functions.

Modified:
    llvm/trunk/include/llvm/Type.h

Modified: llvm/trunk/include/llvm/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=83293&r1=83292&r2=83293&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Type.h (original)
+++ llvm/trunk/include/llvm/Type.h Mon Oct  5 00:05:57 2009
@@ -205,6 +205,12 @@
   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;





More information about the llvm-commits mailing list