[PATCH] D47525: [TableGen] Make DAGInstruction own Pattern to avoid leaking it.
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 30 09:24:59 PDT 2018
dsanders added inline comments.
================
Comment at: utils/TableGen/CodeGenDAGPatterns.h:924
- TreePattern *getPattern() const { return Pattern; }
+ const std::unique_ptr<TreePattern> &getPattern() const { return Pattern; }
unsigned getNumResults() const { return Results.size(); }
----------------
This code looks like it's either making a copy of pattern or giving ownership of DAGInstruction::Pattern to the caller. Shouldn't it be returning a raw pointer?
https://reviews.llvm.org/D47525
More information about the llvm-commits
mailing list