[llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h

Chris Lattner lattner at cs.uiuc.edu
Fri Jan 14 22:52:31 PST 2005



Changes in directory llvm/include/llvm/CodeGen:

ValueTypes.h updated: 1.9 -> 1.10
---
Log message:

Add some helper methods.


---
Diffs of the changes:  (+10 -0)

Index: llvm/include/llvm/CodeGen/ValueTypes.h
diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.9 llvm/include/llvm/CodeGen/ValueTypes.h:1.10
--- llvm/include/llvm/CodeGen/ValueTypes.h:1.9	Wed Jan  5 21:25:27 2005
+++ llvm/include/llvm/CodeGen/ValueTypes.h	Sat Jan 15 00:52:18 2005
@@ -19,6 +19,7 @@
 #include <cassert>
 
 namespace llvm {
+  class Type;
 
 /// MVT namespace - This namespace defines the ValueType enum, which contains
 /// the various low-level value types.
@@ -67,6 +68,15 @@
     case MVT::i128: return 128;
     }
   }
+
+  /// MVT::getValueTypeString - This function returns value type as a string,
+  /// e.g. "i32".
+  const char *getValueTypeString(ValueType VT);
+
+  /// MVT::getTypeForValueType - This method returns an LLVM type corresponding
+  /// to the specified ValueType.  For integer types, this returns an unsigned
+  /// type.  Note that this will abort for types that cannot be represented.
+  const Type *getTypeForValueType(ValueType VT);
 };
 
 } // End llvm namespace






More information about the llvm-commits mailing list