diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-05-25 18:07:40 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-05-25 18:07:40 +0000 |
| commit | 4fb996e82dc09501eb2b5f0e046e4113f17e768a (patch) | |
| tree | 8825e095fd9154f73fb64dfd22f0339fff7de8ba | |
| parent | e57206d81b52ab5f9189e4951ba4e6f75e5f6ea4 (diff) | |
| download | bcm5719-llvm-4fb996e82dc09501eb2b5f0e046e4113f17e768a.tar.gz bcm5719-llvm-4fb996e82dc09501eb2b5f0e046e4113f17e768a.zip | |
TableGen: Use StringRef instead of std::string
llvm-svn: 270741
| -rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 4 | ||||
| -rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index db98feaa247..fb9d29c7593 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -39,7 +39,7 @@ MVT::SimpleValueType llvm::getValueType(Record *Rec) { return (MVT::SimpleValueType)Rec->getValueAsInt("Value"); } -std::string llvm::getName(MVT::SimpleValueType T) { +StringRef llvm::getName(MVT::SimpleValueType T) { switch (T) { case MVT::Other: return "UNKNOWN"; 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) { case MVT::Other: return "MVT::Other"; case MVT::i1: return "MVT::i1"; diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h index 72145133aa7..85a8c1b1887 100644 --- a/llvm/utils/TableGen/CodeGenTarget.h +++ b/llvm/utils/TableGen/CodeGenTarget.h @@ -52,8 +52,8 @@ enum SDNP { /// record corresponds to. MVT::SimpleValueType getValueType(Record *Rec); -std::string getName(MVT::SimpleValueType T); -std::string getEnumName(MVT::SimpleValueType T); +StringRef getName(MVT::SimpleValueType T); +StringRef getEnumName(MVT::SimpleValueType T); /// getQualifiedName - Return the name of the specified record, with a /// namespace qualifier if the record contains one. |

