diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-08-10 19:50:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-08-10 19:50:32 +0000 |
| commit | 12a19fda99736208ea14a742d3a976410182349a (patch) | |
| tree | 045be469af576e5e930f1f68e7b5690b2172a021 /llvm/support/tools/TableGen/CodeGenWrappers.cpp | |
| parent | 8aba798388db4b97b0afda8405e865977bbd7b52 (diff) | |
| download | bcm5719-llvm-12a19fda99736208ea14a742d3a976410182349a.tar.gz bcm5719-llvm-12a19fda99736208ea14a742d3a976410182349a.zip | |
Add new function
llvm-svn: 7706
Diffstat (limited to 'llvm/support/tools/TableGen/CodeGenWrappers.cpp')
| -rw-r--r-- | llvm/support/tools/TableGen/CodeGenWrappers.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/support/tools/TableGen/CodeGenWrappers.cpp b/llvm/support/tools/TableGen/CodeGenWrappers.cpp index 93e1856c327..61c3abc2971 100644 --- a/llvm/support/tools/TableGen/CodeGenWrappers.cpp +++ b/llvm/support/tools/TableGen/CodeGenWrappers.cpp @@ -34,6 +34,24 @@ std::string getName(MVT::ValueType T) { } } +std::string getEnumName(MVT::ValueType T) { + switch (T) { + case MVT::Other: return "Other"; + case MVT::i1: return "i1"; + case MVT::i8: return "i8"; + case MVT::i16: return "i16"; + case MVT::i32: return "i32"; + case MVT::i64: return "i64"; + case MVT::i128: return "i128"; + case MVT::f32: return "f32"; + case MVT::f64: return "f64"; + case MVT::f80: return "f80"; + case MVT::f128: return "f128"; + case MVT::isVoid:return "isVoid"; + default: assert(0 && "ILLEGAL VALUE TYPE!"); return ""; + } +} + std::ostream &operator<<(std::ostream &OS, MVT::ValueType T) { return OS << getName(T); |

