[llvm-commits] CVS: llvm/utils/TableGen/CodeGenWrappers.cpp CodeGenWrappers.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 10 14:51:01 PDT 2003
Changes in directory llvm/utils/TableGen:
CodeGenWrappers.cpp updated: 1.2 -> 1.3
CodeGenWrappers.h updated: 1.3 -> 1.4
---
Log message:
Add new function
---
Diffs of the changes:
Index: llvm/utils/TableGen/CodeGenWrappers.cpp
diff -u llvm/utils/TableGen/CodeGenWrappers.cpp:1.2 llvm/utils/TableGen/CodeGenWrappers.cpp:1.3
--- llvm/utils/TableGen/CodeGenWrappers.cpp:1.2 Thu Aug 7 18:15:21 2003
+++ llvm/utils/TableGen/CodeGenWrappers.cpp Sun Aug 10 14:50:32 2003
@@ -34,6 +34,24 @@
}
}
+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);
Index: llvm/utils/TableGen/CodeGenWrappers.h
diff -u llvm/utils/TableGen/CodeGenWrappers.h:1.3 llvm/utils/TableGen/CodeGenWrappers.h:1.4
--- llvm/utils/TableGen/CodeGenWrappers.h:1.3 Thu Aug 7 18:15:21 2003
+++ llvm/utils/TableGen/CodeGenWrappers.h Sun Aug 10 14:50:32 2003
@@ -22,6 +22,7 @@
std::ostream &operator<<(std::ostream &OS, MVT::ValueType T);
std::string getName(MVT::ValueType T);
+std::string getEnumName(MVT::ValueType T);
/// CodeGenTarget - This class corresponds to the Target class in the .td files.
More information about the llvm-commits
mailing list