Remove the now unused SILBuilder::createDebugValueAddr function. Passes
must always update existing debug value instructions rather than
recreating new ones, and emitDebugDescription has been updated to just
prepend an op_deref. This was the last remnant of DebugValueAddrInst.
Since salvageDebugInfo now uses debug reconstruction basic blocks,
the plus, minus, and constant SILDebugInfoExpression operators were
left unused. This commit removes them, and updates some of their tests
to use debug basic blocks.
Assisted-by: Claude
getVarInfo() now always returns a variable with a location and scope.
To opt out of this change, getVarInfo(false) returns an incomplete variable.
This can be used to work around bugs, but should only really be used for
printing.
The complete var info will also contain the type, except for debug_values,
as its type depends on another instruction, which may be inconsistent if
called mid-pass.
All locations in debug variables are now also stripped of flags, to avoid
issues when comparing or hashing debug variables.
This document describes how debug info works at the SIL level and how to
correctly update debug info in SIL optimization passes. This document is
inspired by its LLVM analog, "How to Update Debug Info: A Guide for LLVM Pass
Authors", which can be found at https://llvm.org/docs/HowToUpdateDebugInfo.html