[PATCH] D47463: [TableGen] Avoid leaking TreePatternNodes by using shared_ptr.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 11:32:42 PDT 2018
fhahn added inline comments.
================
Comment at: utils/TableGen/CodeGenDAGPatterns.h:939-942
+ ~DAGInstruction() {
+ if (Pattern)
+ delete Pattern;
+ }
----------------
dsanders wrote:
> Does this object really own Pattern? It looks like it probably does but it's a raw pointer. If it really does own it we should be using unique_ptr
Ah that change is unrelated to the shared_ptr changes. I will try to move it out, it should be clearer then.
https://reviews.llvm.org/D47463
More information about the llvm-commits
mailing list