1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

TableGen: Use StringRef instead of std::string

llvm-svn: 270741
This commit is contained in:
Matt Arsenault 2016-05-25 18:07:40 +00:00
parent 1f6cee6a4f
commit 4a9e67f4ef
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ MVT::SimpleValueType llvm::getValueType(Record *Rec) {
return (MVT::SimpleValueType)Rec->getValueAsInt("Value"); return (MVT::SimpleValueType)Rec->getValueAsInt("Value");
} }
std::string llvm::getName(MVT::SimpleValueType T) { StringRef llvm::getName(MVT::SimpleValueType T) {
switch (T) { switch (T) {
case MVT::Other: return "UNKNOWN"; case MVT::Other: return "UNKNOWN";
case MVT::iPTR: return "TLI.getPointerTy()"; case MVT::iPTR: return "TLI.getPointerTy()";
@ -48,7 +48,7 @@ std::string llvm::getName(MVT::SimpleValueType T) {
} }
} }
std::string llvm::getEnumName(MVT::SimpleValueType T) { StringRef llvm::getEnumName(MVT::SimpleValueType T) {
switch (T) { switch (T) {
case MVT::Other: return "MVT::Other"; case MVT::Other: return "MVT::Other";
case MVT::i1: return "MVT::i1"; case MVT::i1: return "MVT::i1";

View File

@ -52,8 +52,8 @@ enum SDNP {
/// record corresponds to. /// record corresponds to.
MVT::SimpleValueType getValueType(Record *Rec); MVT::SimpleValueType getValueType(Record *Rec);
std::string getName(MVT::SimpleValueType T); StringRef getName(MVT::SimpleValueType T);
std::string getEnumName(MVT::SimpleValueType T); StringRef getEnumName(MVT::SimpleValueType T);
/// getQualifiedName - Return the name of the specified record, with a /// getQualifiedName - Return the name of the specified record, with a
/// namespace qualifier if the record contains one. /// namespace qualifier if the record contains one.