<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95440>95440</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
DIStringType does not have a way to represent underlying character type.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
abidh
</td>
</tr>
</table>
<pre>
While adding support for character type in `flang-new`, I noticed that `DIStringType` does not have a field to represent the underlying character type of a string. So it can only represent strings with default character types.
Please note that DWARF5 allows `DW_AT_type` on `DW_TAG_string_type`. The section 5.11 says,
"A string type entry may have a DW_AT_type attribute describing how each character is encoded and is to be interpreted. The value of this attribute is a reference to a DW_TAG_base_type base type entry. If the attribute is absent, then the character is encoded using the system default."
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0k0FvszgQhn-NuYyKjAlJOHDIbpRVb6ttpB4rGw-xV46N7CER_35lSNW0-32XBOOZd553ZpAp2YtH7FjzB2uOhZzIhNhJZbUpVNBz926sQ5BaW3-BNI1jiARDiNAbGWVPGIHmEcF6YFs-OOkvLx7vbMuZ-BNewQeyPWogIylHHF_fKFp_Oc8jsi0HHTDlIDDyhiBhsOg0UICIY8SEnoAMwuQ1RjdniB-FwwAS0qJZwlsAS9BLD8G7-UljDUhwt2RA4yAnRz-UUsn4kfHD-vu3Q5kwk-HKfnw__HNqQDoX7mlx8v5xOH_Qw0fwj3fnw18fa7XPuxLOBiFhTzZ4aMqqgiTnlPvzqCjE4UG4ekJPcYarnD-78lULJFG0aiIEjamPVuUsE-6AsjdPlmwC9H3QqEF6nY8UQOVBEcYxIqFewW7STUsbydj0JJ8PEHHAiL7HnL1wZH9KJlxp8tMTcwmvwzKv7zIqzyD7JYN-uf8l55SWDuRmzYnw-jmokgnxPJtCd7Vu61YW2FW7ai_atml4Ybrtvm0E16rWeq_221oir4em4gJxN1RtX9hOcLHh26qudqJpeNnXwwZV1aqB77hUA9twvErrSudu1zLES2FTmrBrm82GF04qdGn5WITweIflMtM1xyJ2OedFTZfENtzZROlLhSw57J6X_3-bf5fz973_7c6XxRRdZ4jGxOoDEycmThdLZlJlH65MnHLZx9_LGMO_2BMTpwU2MXFazdw68V8AAAD__0VAW8k">