[PATCH] D47525: [TableGen] Make DAGInstruction own Pattern to avoid leaking it.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 15:38:14 PDT 2018


fhahn added inline comments.


================
Comment at: utils/TableGen/CodeGenDAGPatterns.cpp:3575
+  DAGInstruction TheInst(std::move(I), Results, Operands, InstImpResults);
+  DAGInsts.emplace(
+      std::make_pair(InstPattern->getRecord(), std::move(TheInst)));
----------------
craig.topper wrote:
> Why doesn't insert work? There should be an rvalue pair version.
Thanks. With emplace we do not have to use make_pair.


https://reviews.llvm.org/D47525





More information about the llvm-commits mailing list