TableGen: avoid string copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2016-07-05 22:51:30 +00:00
parent 2442068c12
commit 4d4806bd1c

View File

@ -230,7 +230,7 @@ void SearchableTableEmitter::emitLookupDeclaration(StringRef Name,
void SearchableTableEmitter::emitMapping(Record *InstanceClass,
raw_ostream &OS) {
std::string TableName = InstanceClass->getName();
const std::string &TableName = InstanceClass->getName();
std::vector<Record *> Items = Records.getAllDerivedDefinitions(TableName);
// Gather all the records we're going to need for this particular mapping.