aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-01 15:58:41 +0000
committerChris Lattner <sabre@nondot.org>2005-01-01 15:58:41 +0000
commitfd1cbc095ad34b9ae9e65b15465c570e1b6ff3fb (patch)
tree8a6c8aa97474a99faba2250f782243c31cd34aaf /include/llvm/CodeGen
parent9964cd8e9a3c54a285cb04b68ad0d6dd0f1d6fb9 (diff)
downloadexternal_llvm-fd1cbc095ad34b9ae9e65b15465c570e1b6ff3fb.zip
external_llvm-fd1cbc095ad34b9ae9e65b15465c570e1b6ff3fb.tar.gz
external_llvm-fd1cbc095ad34b9ae9e65b15465c570e1b6ff3fb.tar.bz2
Add two helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index b523b71..ed58c9e 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