diff options
| author | Andy Yankovsky <weratt@gmail.com> | 2021-05-18 14:43:20 +0200 |
|---|---|---|
| committer | Andy Yankovsky <weratt@gmail.com> | 2021-05-19 15:32:17 +0200 |
| commit | 0bab7b26f4d9dc4cb8f6c2877ad4a2c388c41c65 (patch) | |
| tree | 11865c8d3e1aaa289d862fa12fa89a28faa0100f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | ff954865137cdd11165340e2c9537cfd1b3f805d (diff) | |
[lldb] Encode `bool` as unsigned int
`bool` is considered to be unsigned according to `std::is_unsigned<bool>::value` (and `Type::GetTypeInfo`). Encoding it as signed int works fine for normal variables and fields, but breaks when reading the values of boolean bitfields. If the field is declared as `bool b : 1` and has a value of `0b1`, the call to `SBValue::GetValueAsSigned()` will return `-1`.
Reviewed By: teemperor
Differential Revision: https://reviews.llvm.org/D102685
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
