[TableGen] Return StringRef from ValueTypeByHwMode::getMVTName

Avoid unnecessary std::string creations during TypeSetByHwMode::writeToStream.

Found during investigations into PR28222

Differential Revision: https://reviews.llvm.org/D38174

llvm-svn: 313983
diff --git a/llvm/utils/TableGen/InfoByHwMode.h b/llvm/utils/TableGen/InfoByHwMode.h
index 71149e8..57640fc 100644
--- a/llvm/utils/TableGen/InfoByHwMode.h
+++ b/llvm/utils/TableGen/InfoByHwMode.h
@@ -129,7 +129,7 @@
   MVT getType(unsigned Mode) const { return get(Mode); }
   MVT &getOrCreateTypeForMode(unsigned Mode, MVT Type);
 
-  static std::string getMVTName(MVT T);
+  static StringRef getMVTName(MVT T);
   std::string getAsString() const;
   void dump() const;
 };