From 2df6dc579ca7c85a20d2d221f4df32fbb26fc97a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 31 Mar 2007 04:03:02 +0000 Subject: add a method to turn a type into a VT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35526 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ValueTypes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/llvm/CodeGen/ValueTypes.h') diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index cc24563b8d..f35f460a1b 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -197,6 +197,11 @@ namespace MVT { // MVT = Machine Value Types /// 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); + + /// MVT::getValueType - Return the value type corresponding to the specified + /// type. This returns all vectors as MVT::Vector and all pointers as + /// MVT::iPTR. + ValueType getValueType(const Type *Ty); } } // End llvm namespace -- cgit v1.2.3-70-g09d2