[all-commits] [llvm/llvm-project] ab49dc: [DebugInfo][InstrRef][NFC] Use unique_ptr instead ...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Tue Mar 1 04:50:18 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab49dce01f211fd80f76f449035d771f5e2720b9
https://github.com/llvm/llvm-project/commit/ab49dce01f211fd80f76f449035d771f5e2720b9
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2022-03-01 (Tue, 01 Mar 2022)
Changed paths:
M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
M llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
M llvm/unittests/CodeGen/InstrRefLDVTest.cpp
Log Message:
-----------
[DebugInfo][InstrRef][NFC] Use unique_ptr instead of raw pointers
InstrRefBasedLDV allocates some big tables of ValueIDNum, to store live-in
and live-out block values in, that then get passed around as pointers
everywhere. This patch wraps the allocation in a std::unique_ptr, names
some types based on unique_ptr, and passes references to those around
instead. There's no functional change, but it makes it clearer to the
reader that references to these tables are borrowed rather than owned, and
we get some extra validity assertions too.
Differential Revision: https://reviews.llvm.org/D118774
More information about the All-commits
mailing list