diff options
author | Frederic Riss <friss@apple.com> | 2019-10-08 15:35:59 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2019-10-08 15:35:59 +0000 |
commit | 41ff39605ea1c9278f6ff15208475f5f3c863f44 (patch) | |
tree | 0f98515be82aa0f5d30ba7254a29626ed93b1ac4 /llvm/lib/CodeGen/IfConversion.cpp | |
parent | d6470fb01a08b7e51870e27bab5271e2fea04ff6 (diff) | |
download | bcm5719-llvm-41ff39605ea1c9278f6ff15208475f5f3c863f44.tar.gz bcm5719-llvm-41ff39605ea1c9278f6ff15208475f5f3c863f44.zip |
Add pretty printing of Clang "bitfield" enums
Summary:
Using enumerators as flags is standard practice. This patch adds
support to LLDB to display such enum values symbolically, eg:
(E) e1 = A | B
If enumerators don't cover the whole value, the remaining bits are
displayed as hexadecimal:
(E) e4 = A | 0x10
Detecting whether an enum is used as a bitfield or not is
complicated. This patch implements a heuristic that assumes that such
enumerators will either have only 1 bit set or will be a combination
of previous values.
This patch doesn't change the way we currently display enums which the
above heuristic would not consider as bitfields.
Reviewers: jingham, labath
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D67520
llvm-svn: 374067
Diffstat (limited to 'llvm/lib/CodeGen/IfConversion.cpp')
0 files changed, 0 insertions, 0 deletions