[llvm] r232551 - Remove StringRef->std::string->StringRef conversions.
Yaron Keren
yaron.keren at gmail.com
Tue Mar 17 14:33:39 PDT 2015
Author: yrnkrn
Date: Tue Mar 17 16:33:38 2015
New Revision: 232551
URL: http://llvm.org/viewvc/llvm-project?rev=232551&view=rev
Log:
Remove StringRef->std::string->StringRef conversions.
As StringInit::get() accepts StringRef there is no need
to construct a std::string out of the StringRef input and
then construct a new StringRef from the std::string.
Modified:
llvm/trunk/include/llvm/TableGen/Record.h
Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=232551&r1=232550&r2=232551&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Tue Mar 17 16:33:38 2015
@@ -1477,7 +1477,7 @@ public:
return false;
}
bool isTemplateArg(StringRef Name) const {
- return isTemplateArg(StringInit::get(Name.str()));
+ return isTemplateArg(StringInit::get(Name));
}
const RecordVal *getValue(const Init *Name) const {
@@ -1502,7 +1502,7 @@ public:
TemplateArgs.push_back(Name);
}
void addTemplateArg(StringRef Name) {
- addTemplateArg(StringInit::get(Name.str()));
+ addTemplateArg(StringInit::get(Name));
}
void addValue(const RecordVal &RV) {
@@ -1527,7 +1527,7 @@ public:
}
void removeValue(StringRef Name) {
- removeValue(StringInit::get(Name.str()));
+ removeValue(StringInit::get(Name));
}
bool isSubClassOf(const Record *R) const {
More information about the llvm-commits
mailing list