<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/96954>96954</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [lldb] Expose a way to identify if a variable is const in the Python API.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mvanotti
      </td>
    </tr>
</table>

<pre>
    It looks like there is no clear way to determine if a variable is `const` or `constexpr` in `lldb`. The best way I could find to determine that is by looking at the output of `GetDisplayTypeName()`, which contains the `const` keyword.

It would be nice to have a way to tell if a variable is a constant by invoking a method, or for example, by adding it to the TypeFlags: https://lldb.llvm.org/python_api_enums.html#typeflags
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkks1yqzgQhZ9GbLpCCRmwWbDIjMdT3kxlkX1KoMbSREiU1ODw9rek3OQmlQ0_jfrw9ekjYzQ3h9iz5i_WnAu5kvahnzfpPJEpBq_2_kpgvX-NYM0rAmkMCCaC8zBalAHucgfyoJAwzMYhmAkkbDIYOdh8lLV89C4Sazn48PmKb0tIJeNSyVo1sJaX8KwRBoyUha8w-tUqmIxT3_9CWlISH_aMZ9wNJCU88CstK4Gfkuy_SGcTFyv3533B_-SMTJyY6FjLmfgb7tqMGkbvSBoXc_tX2lfc7z6okvEz44_v1yvBPTMNCM6MmLC03BDkhxWE1v50QUKWlY4Ss3Hbb2iYkbRXicYHmHwAfJPzYjFVhh2kUumcoSytEdIgFytvkR0eQRMt6YGJCxOXZGJp7TaXPtyYuCw7ae9e5GJe0K1zLDXNlokD7QtOSaJQ_UF1h04W2FfHqmuq5sSrQveTrLoRp6E7qaEWp0M94qk51Mg7ccTjqS5ML7ioeSuOVVe1NS95O2J9bKU6Tk11bA6s5jhLYz95ChPjin3Xdk1dWDmgjTl4Qji8Q_7IhEg5DH3qeRjWW2Q1tyZS_KNChmxObE5Mc4Z_3hYfv9hvFDoy0_5zBXkBKW_JxqfsDTw-XctiDbb_7uTNkF6HcvRztnX7uD0swf-PIzFxycSRicv7RFsvfgUAAP__we8Zdg">