tberghammer added a comment. The previous version of the data formatter was triggering for std::vector<std::allocator<bool>> as well. Jason, do you know why was it the case? Do we need that functionality because of a broken compiler version or can it be removed?
Note: I added a few comments about the data formatter itself but feel free to ignore them if you want to keep this change small. ================ Comment at: source/Plugins/Language/CPlusPlus/LibCxxVector.cpp:52-53 + LibcxxVectorBoolSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); + + ~LibcxxVectorBoolSyntheticFrontEnd() override = default; + ---------------- Not needed ================ Comment at: source/Plugins/Language/CPlusPlus/LibCxxVector.cpp:201-228 + switch (bit_index) { + case 0: + mask = 1; + break; + case 1: + mask = 2; + break; ---------------- This switch seems silly. You can just replace it with "mask = (1 << bit_index)" ================ Comment at: source/Plugins/Language/CPlusPlus/LibCxxVector.cpp:233-234 + if (bit_set && buffer_sp && buffer_sp->GetBytes()) + *(buffer_sp->GetBytes()) = + 1; // regardless of endianness, anything non-zero is true + StreamString name; ---------------- I think the formatting here makes the code pretty hard to read ================ Comment at: source/Plugins/Language/CPlusPlus/LibCxxVector.cpp:301-304 + TypeImpl type = valobj_sp->GetTypeImpl(); + if (!type.IsValid()) + return nullptr; + CompilerType compiler_type = type.GetCompilerType(false); ---------------- Is there a reason you are not using ValueObject::GetCompilerType()? https://reviews.llvm.org/D31880 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits