forked from OSchip/llvm-project
TableGen: Use StringRef instead of std::string
llvm-svn: 270741
This commit is contained in:
parent
e57206d81b
commit
4fb996e82d
|
@ -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";
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue