[llvm] r258020 - [TableGen] Keep a returned const reference instead of making a copy. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 17 12:38:21 PST 2016
Author: ctopper
Date: Sun Jan 17 14:38:21 2016
New Revision: 258020
URL: http://llvm.org/viewvc/llvm-project?rev=258020&view=rev
Log:
[TableGen] Keep a returned const reference instead of making a copy. NFC
Modified:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=258020&r1=258019&r2=258020&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Sun Jan 17 14:38:21 2016
@@ -559,7 +559,7 @@ void AsmWriterEmitter::EmitGetRegisterNa
Record *AsmWriter = Target.getAsmWriter();
std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName");
const auto &Registers = Target.getRegBank().getRegisters();
- std::vector<Record*> AltNameIndices = Target.getRegAltNameIndices();
+ const std::vector<Record*> &AltNameIndices = Target.getRegAltNameIndices();
bool hasAltNames = AltNameIndices.size() > 1;
std::string Namespace =
Registers.front().TheDef->getValueAsString("Namespace");
More information about the llvm-commits
mailing list