mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 01:36:05 +00:00

As described in #107998, we were not handling the case well when length of the character is not part of the type. This PR handles one of the case when the length can be calculated by looking at the result of corresponding `fir.unboxchar`. The DIStringTypeAttr have a `stringLength` field that can be a variable. We create an artificial variable that will hold the length and used as value of `stringLength` field. The variable is then attached with a `DbgValueOp`. Fixes #107998.