aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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