This patch (4/N) stems from D69787 as suggested by @aprantl (Adrian Prantl)
Summary:
This patch adds support in IR verifier and Bitcode for DW_OP_implicit_pointer
The test case having IR with DW_OP_LLVM_implicit_pointer, will be compiled successfully
Class DwarfCompileUnit has been modified to add member ImplicitVars of vector type. Below is the usage of it. First operand of DW_OP_implicit_pointer operation is a reference to a debugging information entry that describes the dereferenced object’s value. when this operation is created, The debugging information entry is not yet formed. To solve this problem, we maintain a vector of dereferenced objects. We keep index of dereferenced object's at first operand of DW_OP_implicit_pointer operation temporarily. This temporary value is later replaced by actual value when available.
If a variable has only single DBG_VALUE then currently location list is not created instead value is used to initialized the var. In case of DW_OP_implicit_pointer, now location list will still be created.
Testing:
- Added unit test for validation thru llvm-dwarfdump
- check-llvm
- check-debuginfo (the debug info integration tests)
Why is this necessary?