From fd1cbc095ad34b9ae9e65b15465c570e1b6ff3fb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 1 Jan 2005 15:58:41 +0000 Subject: [PATCH] Add two helper functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19208 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ValueTypes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index b523b71a14b..ed58c9eee6a 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -40,6 +40,13 @@ namespace MVT { // MVT = Machine Value Types isVoid = 11, // This has no value }; + + static inline bool isInteger(ValueType VT) { + return VT >= i1 && VT <= i128; + } + static inline bool isFloatingPoint(ValueType VT) { + return VT >= f32 && VT <= f128; + } }; } // End llvm namespace