teak-llvm/lldb/packages/Python/lldbsuite/test/lang/c
Frederic Riss 41ff39605e 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
2019-10-08 15:35:59 +00:00
..
anonymous [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
array_types [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
bitfields [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
blocks Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
conflicting-symbol [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
const_variables Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
enum_types Add pretty printing of Clang "bitfield" enums 2019-10-08 15:35:59 +00:00
find_struct_type [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
forward [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
function_types [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
global_variables [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
inlines [lldbsuite] Un-xfail TestRedefinitionsInInlines on Windows 2018-12-20 03:04:14 +00:00
local_types [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
local_variables Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
modules [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
offsetof [dotest] Delete trivial inline test makefiles 2019-09-05 06:55:23 +00:00
recurse [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
register_variables Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
set_values [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
shared_lib [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
shared_lib_stripped_symbols [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
step-target [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
stepping [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
strings [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
struct_types [dotest] Delete trivial inline test makefiles 2019-09-05 06:55:23 +00:00
tls_globals [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
typedef [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
unicode Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
unions [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
vla [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00