commit | 6a480369062e6572ecbd88a6c2f46e50920ba47f | [log] [tgz] |
---|---|---|
author | Dave Lee <davelee.com@gmail.com> | Wed Aug 03 20:45:47 2022 -0600 |
committer | Copybara-Service <copybara-worker@google.com> | Sun Aug 07 11:19:51 2022 -0700 |
tree | db975c7a4ea980fe28782688945eb529e5c894a8 | |
parent | c8e0dd608d210d944ccfbd7198081466a3113384 [diff] |
[lldb] Dynamically generate enum names in lldbutil Change the `<enum>_to_str` functions in lldbutil to be dynamic. Instead of a manually maintained if/elif switch, the functions now perform lookup in a dynamically generated dict. The names are determined by stripping the enum's prefix, and then lowercasing the remaining suffix, ex: eStateRunning -> "running" Differential Revision: https://reviews.llvm.org/D131138 GitOrigin-RevId: e49c1568b6160f9a02da3295ac0d5c684fb64201