[PATCH] D118774: [DebugInfo][InstrRef][NFC] Use unique_ptr instead of raw pointers for value tables

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 3 06:04:43 PST 2022


jmorse updated this revision to Diff 405606.
jmorse added a comment.

Jeremy's journey:

- Orlando: This allocation/free code looks sketchy now,
- dblaikie: You should use std::unique_ptr!,
- asan buildbots: YOU SHOULD REALLY USE STD::UNIQUE_PTR

Rebased onto main -- I cut out some dead code paths which now don't need to be updated, removed some un-necessary indirection, and some un-necessary calls to reset() that will now happen automagically due to unique_ptr-ness. I've also updated the unit tests, a purely mechanical change that alters what allocate the value tables.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118774/new/

https://reviews.llvm.org/D118774

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
  llvm/unittests/CodeGen/InstrRefLDVTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118774.405606.patch
Type: text/x-patch
Size: 95972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220203/8ffd6639/attachment-0001.bin>


More information about the llvm-commits mailing list