mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 16:06:08 +00:00

Update DWARFExpression::Operation and LVOperation to support more than 2 operands. Take the opportunity to use a SmallVector, which will handle at least 2 operands without allocation anyway, and removes the static limit completely. As there is no longer the concept of an "unused operand", remove Operation::Encoding::SizeNA. Any use of it is now replaced with explicit checks for how many operands an operation has. There are still places where the limit remains 2, namely in the DWARFLinker and in DIExpressions, but these can be updated in later patches as-needed. There are no explicit tests as this is nearly NFC: no new operation is added which makes use of the additional operand capacity yet. A future patch adding a new DWARF extension point will include operations which require the support. Reviewed By: Orlando, CarlosAlbertoEnciso Differential Revision: https://reviews.llvm.org/D147270