diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-15 06:52:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-15 06:52:18 +0000 |
commit | 3e68b418725c22db792384652425b75e56b4de3c (patch) | |
tree | 6e584f3c637e84dfaafa049d8f80ee916c76035c /include/llvm/CodeGen | |
parent | 0f69b2910810b7c0971a739f18b37fae2a20eca5 (diff) | |
download | external_llvm-3e68b418725c22db792384652425b75e56b4de3c.zip external_llvm-3e68b418725c22db792384652425b75e56b4de3c.tar.gz external_llvm-3e68b418725c22db792384652425b75e56b4de3c.tar.bz2 |
Add some helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index ca430e4..ce6cb07 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -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 @@ namespace MVT { // MVT = Machine Value Types 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 |