diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-05 05:05:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-05 05:05:57 +0000 |
commit | cc1cfda9ea0844a392a35f807d2e887b2ca31495 (patch) | |
tree | 2d177ed0ca756d7297dbe06eba8dbde03b0e8986 | |
parent | 9ca7c0913a1703437df111043c999b583f40d2d9 (diff) | |
download | bcm5719-llvm-cc1cfda9ea0844a392a35f807d2e887b2ca31495.tar.gz bcm5719-llvm-cc1cfda9ea0844a392a35f807d2e887b2ca31495.zip |
add some helper functions.
llvm-svn: 83293
-rw-r--r-- | llvm/include/llvm/Type.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Type.h b/llvm/include/llvm/Type.h index 9c2fae0dfb5..f962a3f4841 100644 --- a/llvm/include/llvm/Type.h +++ b/llvm/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; |