LLVM Debug metadata lacks the capability of representing named constants. Languages such as Fortran has named constants, and code written in Fortran extensively uses Constants, hence there's an inherent need to provide debug information support for Constants to aid Fortran programs debugging.
This patch introduces DIConstant, which at the moment, will serve the needs of Fortran frontends.
Support Notes:
- Only 64 bit Signed Integer supported for now.
- Fortran programs with constants can can be debugged using GDB, correct value of constants getting accessed/printed.
Testing:- check-llvm
- check-llvm-unit (2 unit tests added).
clang-tidy: warning: 'auto Ty' can be declared as 'auto *Ty' [llvm-qualified-auto]
not useful