summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorJannik Silvanus <jannik.silvanus@amd.com>2022-10-10 17:39:51 +0200
committerJannik Silvanus <jannik.silvanus@amd.com>2022-10-18 17:08:38 +0200
commit6608908b1b7fd9146f632b040c0b48c2fb661966 (patch)
tree944ebb80f748c4d1108ec9876bf5e5411f73d131 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parenta4b010034f57b428acb3a57a767366eb40816173 (diff)
[ADT] Extend EnumeratedArray
EnumeratedArray is essentially a wrapper around a fixed-size array that uses enum values instead of integers as indices. * Add iterator support (begin/end/rbegin/rend), which enables the use of iterator/range based algorithms on EnumeratedArrays. * Add common container typedefs (value_type etc.), allowing drop-in replacements of other containers in cases relying on these. * Add a constructor that takes an std::initializer_list<T>. * Make the size() function const. * Add empty(). Iterator support slightly lowers the protection non-type-safe accesses, because iterator arithmetic is not enum-based, and one can now use *(begin() + IntIndex). However, it is and was also always possible to just cast arbitrary indices to the enum type. Differential Revision: https://reviews.llvm.org/D135594
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions