Make VTs and UnicodeCharSet ctors constexpr if the compiler supports it.
[oota-llvm.git] / include / llvm / CodeGen / MachineValueType.h
index 7ad782f0b72003930e36ec164ea120399f3b2605..3eb4d0b85de422c856bd0fe3c169e920f83b4557 100644 (file)
@@ -161,8 +161,8 @@ namespace llvm {
 
     SimpleValueType SimpleTy;
 
-    MVT() : SimpleTy((SimpleValueType)(INVALID_SIMPLE_VALUE_TYPE)) {}
-    MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
+    LLVM_CONSTEXPR MVT() : SimpleTy(INVALID_SIMPLE_VALUE_TYPE) {}
+    LLVM_CONSTEXPR MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
 
     bool operator>(const MVT& S)  const { return SimpleTy >  S.SimpleTy; }
     bool operator<(const MVT& S)  const { return SimpleTy <  S.SimpleTy; }