Remove the operator<< for MVT::ValueType in preparation for MVT::ValueType
authorDan Gohman <gohman@apple.com>
Mon, 4 Jun 2007 16:11:03 +0000 (16:11 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 4 Jun 2007 16:11:03 +0000 (16:11 +0000)
being changed from an enum to an integer type, which can't have a custom
operator<< overload.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37412 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenTarget.cpp
utils/TableGen/CodeGenTarget.h
utils/TableGen/RegisterInfoEmitter.cpp

index 7d2e7b3d13472ba58fcf61a8a501fa8c3f6b5623..a6677a2bf8f0c408199a1e1c23ce616ef228e9f0 100644 (file)
@@ -99,11 +99,6 @@ std::string llvm::getEnumName(MVT::ValueType T) {
 }
 
 
-std::ostream &llvm::operator<<(std::ostream &OS, MVT::ValueType T) {
-  return OS << getName(T);
-}
-
-
 /// getTarget - Return the current instance of the Target class.
 ///
 CodeGenTarget::CodeGenTarget() {
index bd403402ca486f353760097fc6bac2c8a0c737d1..7151b7e4bc6714ef476262015e0b2178fb179480 100644 (file)
@@ -37,7 +37,6 @@ enum SDNP { SDNPCommutative, SDNPAssociative, SDNPHasChain,
 /// corresponds to.
 MVT::ValueType getValueType(Record *Rec, const CodeGenTarget *CGT = 0);
 
-std::ostream &operator<<(std::ostream &OS, MVT::ValueType T);
 std::string getName(MVT::ValueType T);
 std::string getEnumName(MVT::ValueType T);
 
index 0e3645b1e55b9c9d8ff7ca485d49cfc2c0b82b29..8b21a9bd571081f492f642e7051a6bb63e91a308 100644 (file)
@@ -209,7 +209,7 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
        << "  static const MVT::ValueType " << Name
        << "[] = {\n    ";
     for (unsigned i = 0, e = RC.VTs.size(); i != e; ++i)
-      OS << RC.VTs[i] << ", ";
+      OS << getName(RC.VTs[i]) << ", ";
     OS << "MVT::Other\n  };\n\n";
   }
   OS << "}  // end anonymous namespace\n\n";