llvm.org GIT mirror llvm / d028f0c
[TableGen] Combine variable declaration and initialization. Move a string into a vector instead of copying. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257155 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
1 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
158158 if (!Inst)
159159 continue; // PHI, INLINEASM, CFI_INSTRUCTION, etc.
160160
161 std::string Command;
162161 if (Inst->Operands.empty())
163162 continue; // Instruction already done.
164163
165 Command = " " + Inst->Operands[0].getCode() + "\n";
164 std::string Command = " " + Inst->Operands[0].getCode() + "\n";
166165
167166 // Check to see if we already have 'Command' in UniqueOperandCommands.
168167 // If not, add it.
177176 }
178177 if (!FoundIt) {
179178 InstIdxs[i] = UniqueOperandCommands.size();
180 UniqueOperandCommands.push_back(Command);
179 UniqueOperandCommands.push_back(std::move(Command));
181180 InstrsForCase.push_back(Inst->CGI->TheDef->getName());
182181
183182 // This command matches one operand so far.