[Lldb-commits] [PATCH] D39966: Add a data formatter for libc++ std::bitset

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 14 03:13:43 PST 2017


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp:62
+
+  m_bool_type = m_backend.GetCompilerType().GetBasicTypeFromAST(eBasicTypeBool);
+  m_elements.assign(size, ValueObjectSP());
----------------
jingham wrote:
> Does this need to be done every time you Update?  Couldn't you do this in the constructor instead?  This is probably pretty cheap call, so it doesn't matter much, but it seems odd.
The other pretty printers were doing all of their initialization in the Update function, but I don't see a reason why this couldn't be done in the constructor. In that case, I can probably do the byte order and pointer size computation there as well.


https://reviews.llvm.org/D39966





More information about the lldb-commits mailing list