[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 02:40:50 PDT 2018


fhahn created this revision.
fhahn added reviewers: craig.topper, dsanders, stoklund, tstellar, zturner.

By using std::shared_ptr for TreePatternNode, we can avoid leaking them.
Together with the other patches in linked to this one, ASAN shipped with
GCC8 is happy for TableGen.

I tried to keep the number of times we copy shared_ptrs around small,
but I probably missed a few places where there is no need to copy them.


https://reviews.llvm.org/D47463

Files:
  utils/TableGen/CodeGenDAGPatterns.cpp
  utils/TableGen/CodeGenDAGPatterns.h
  utils/TableGen/DAGISelMatcherGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47463.148865.patch
Type: text/x-patch
Size: 54767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180529/849e3970/attachment-0001.bin>


More information about the llvm-commits mailing list