mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-15 16:09:57 +00:00
[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
This commit is contained in:
parent
5dcdd411ac
commit
d028f0c94b
@ -159,11 +159,10 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
||||
if (!Inst)
|
||||
continue; // PHI, INLINEASM, CFI_INSTRUCTION, etc.
|
||||
|
||||
std::string Command;
|
||||
if (Inst->Operands.empty())
|
||||
continue; // Instruction already done.
|
||||
|
||||
Command = " " + Inst->Operands[0].getCode() + "\n";
|
||||
std::string Command = " " + Inst->Operands[0].getCode() + "\n";
|
||||
|
||||
// Check to see if we already have 'Command' in UniqueOperandCommands.
|
||||
// If not, add it.
|
||||
@ -178,7 +177,7 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
||||
}
|
||||
if (!FoundIt) {
|
||||
InstIdxs[i] = UniqueOperandCommands.size();
|
||||
UniqueOperandCommands.push_back(Command);
|
||||
UniqueOperandCommands.push_back(std::move(Command));
|
||||
InstrsForCase.push_back(Inst->CGI->TheDef->getName());
|
||||
|
||||
// This command matches one operand so far.
|
||||
|
Loading…
Reference in New Issue
Block a user