From 6f05a743f7c5101876b27d30d20f653ca21de6b4 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 22 Sep 2017 13:32:26 +0000 Subject: [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 --- llvm/utils/TableGen/InfoByHwMode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/utils/TableGen/InfoByHwMode.h') diff --git a/llvm/utils/TableGen/InfoByHwMode.h b/llvm/utils/TableGen/InfoByHwMode.h index 71149e8da19..57640fc3025 100644 --- a/llvm/utils/TableGen/InfoByHwMode.h +++ b/llvm/utils/TableGen/InfoByHwMode.h @@ -129,7 +129,7 @@ struct ValueTypeByHwMode : public InfoByHwMode { 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; }; -- cgit v1.2.3