[CodeGen] Add MVT::FIRST_VALUETYPE to avoid explicit 0. NFC.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 7 Jan 2015 18:39:00 +0000 (18:39 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Wed, 7 Jan 2015 18:39:00 +0000 (18:39 +0000)
Many places reference MVT::LAST_VALUETYPE when iterating over all
valid MVTs, but they usually start with 0.
With FIRST_VALUETYPE, we can avoid explicit constants when we really
should be using MVT::SimpleValueType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225362 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineValueType.h

index affacb095b5825fd4e805d32a762b79b1158a555..dfb40150755b9f2c2cca5f6da7dd271ebd9a2e92 100644 (file)
@@ -118,6 +118,7 @@ namespace llvm {
                               // unspecified type.  The register class
                               // will be determined by the opcode.
 
+      FIRST_VALUETYPE = 0,    // This is always the beginning of the list.
       LAST_VALUETYPE =  58,   // This always remains at the end of the list.
 
       // This is the current maximum for LAST_VALUETYPE.