[DebugInfo] Follow up c521e44defb5 with an API improvement
authorJeremy Morse <jeremy.morse@sony.com>
Wed, 21 Oct 2020 13:28:28 +0000 (14:28 +0100)
committerJeremy Morse <jeremy.morse@sony.com>
Wed, 21 Oct 2020 13:45:55 +0000 (14:45 +0100)
commit537f0fbe82049b8d5b6c700ecc4ab166c350b0c6
treed838342da8d76942c71e8ec3c918fdc4234d437c
parent1bcec29afb321976cdcaa632ee6a47567dd651a7
[DebugInfo] Follow up c521e44defb5 with an API improvement

As mentioned post-commit in D85749, the 'substituteDebugValuesForInst'
method added in c521e44defb5 would be better off with a limit on the
number of operands to substitute. This handles the common case of
"substitute the first operand between these two differing instructions",
or possibly up to N first operands.
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/lib/CodeGen/MachineFunction.cpp