diff options
| -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.  | 

