[llvm] [DebugInfo][RemoveDIs] Support cloning and remapping DPValues (PR #72546)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 23 09:12:50 PST 2023
================
@@ -175,6 +179,8 @@ class ValueMapper {
Constant *mapConstant(const Constant &C);
void remapInstruction(Instruction &I);
+ void remapDPValue(Module *M, DPValue &V);
+ void remapDPValueRange(Module *M, iterator_range<simple_ilist<DPValue>::iterator> Range);
----------------
jmorse wrote:
It's taking an iterator range, but we're naming it in a weird way -- to avoid including DebugProgramInstruction.h to get the full definition of DPValue we're pre-declaring DPValue and then naming what a list-iterator type for it would be, rather than using DPValue::self_iterator. Then wrapping that in iterator_range.
It looks like there's been a decent effort to keep Instruction.h and friends out of this file, so I'd shy away from adding more #includes. Perhaps we can live with a using/typedef for the iterator type, `using DPValueIteratorT = simple_ilist<DPValue>::iterator`?
https://github.com/llvm/llvm-project/pull/72546
More information about the llvm-commits
mailing list