@@ -144,14 +144,14 @@ static void EmitInstructions(std::vector<AsmWriterInst> &Insts, raw_ostream &O,
144144 O << " switch (MI->getOpcode()) {\n " ;
145145 O << " default: llvm_unreachable(\" Unexpected opcode.\" );\n " ;
146146 std::vector<std::pair<std::string, AsmWriterOperand>> OpsToPrint;
147- OpsToPrint.push_back ( std::pair ( FirstInst.CGI ->Namespace .str () + " :: " +
148- FirstInst.CGI ->TheDef ->getName ().str (),
149- FirstInst.Operands [i]) );
147+ OpsToPrint.emplace_back ( FirstInst.CGI ->Namespace .str () +
148+ " :: " + FirstInst.CGI ->TheDef ->getName ().str (),
149+ FirstInst.Operands [i]);
150150
151151 for (const AsmWriterInst &AWI : SimilarInsts) {
152- OpsToPrint.push_back ( std::pair (
153- AWI. CGI -> Namespace . str () + " ::" + AWI.CGI ->TheDef ->getName ().str (),
154- AWI.Operands [i]) );
152+ OpsToPrint.emplace_back (AWI. CGI -> Namespace . str () +
153+ " ::" + AWI.CGI ->TheDef ->getName ().str (),
154+ AWI.Operands [i]);
155155 }
156156 std::reverse (OpsToPrint.begin (), OpsToPrint.end ());
157157 while (!OpsToPrint.empty ())
@@ -722,7 +722,7 @@ class IAPrinter {
722722 void addOperand (StringRef Op, int OpIdx, int PrintMethodIdx = -1 ) {
723723 assert (OpIdx >= 0 && OpIdx < 0xFE && " Idx out of range" );
724724 assert (PrintMethodIdx >= -1 && PrintMethodIdx < 0xFF && " Idx out of range" );
725- OpMap[Op] = std::pair ( OpIdx, PrintMethodIdx) ;
725+ OpMap[Op] = { OpIdx, PrintMethodIdx} ;
726726 }
727727
728728 unsigned getNumMIOps () { return NumMIOps; }
@@ -753,7 +753,7 @@ class IAPrinter {
753753 Next = I;
754754 }
755755
756- return std::pair ( StringRef (Start, I - Start), Next) ;
756+ return { StringRef (Start, I - Start), Next} ;
757757 }
758758
759759 std::string formatAliasString (uint32_t &UnescapedSize) {
@@ -854,8 +854,8 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
854854 continue ; // Aliases with priority 0 are never emitted.
855855
856856 const DagInit *DI = R->getValueAsDag (" ResultInst" );
857- AliasMap[getQualifiedName (DI->getOperatorAsDef (R->getLoc ()))].insert (
858- std::pair ( CodeGenInstAlias (R, Target), Priority) );
857+ AliasMap[getQualifiedName (DI->getOperatorAsDef (R->getLoc ()))].emplace (
858+ CodeGenInstAlias (R, Target), Priority);
859859 }
860860
861861 // A map of which conditions need to be met for each instruction operand
0 commit comments