Summary:
This patch upgrades DISubrange to support fortran requirements.
Below are the updates/addition of fields.
lowerBound - Now accepts signed integer or DIVariable or DIExpression, earlier it accepted only signed integer.
upperBound - This field is now added and accepts signed interger or DIVariable or DIExpression.
stride - This field is now added and accepts signed interger or DIVariable or DIExpression.
Earlier, count was REQUIERED field, now either of count or upperBound
must be present.
Earlier, absence of lowerBound was considered as lowerBound=0 (considering only c),
considering Fortran which has default lowerBound=1, we'll not stick to that
assumption, Now distinct node will be created for absent lowerBound.
This is required to describe bounds of array which are known at runtime.
Testing:
- added unit tests (hand written)
- check clang
- check llvm
- check debug-info
Why does this take a Metadata * over a DIExpression * or something else more specific?
Update: The PointerUnion<> that is BoundType?