labath wrote:

> LGTM
> 
> Been wondering if we should follow the same principle as we did with 
> `std::string` and simulate the layouts for all the STL types, keeping a 
> record of them as they change. So we know we don't break the old layouts. Of 
> course it has a separate maintenance cost

Yeah, I think the biggest hurdle is the initial work in getting a stripped down 
version of the class in place. The problem is that the container types use a 
lot of template metaprogramming to implement various optimizations like empty 
base class and whatnot. Copying that verbatim would make the test huge (and in 
the case of libstdc++ its probably not even possible), and recreating it from 
scratch is not trivial. I believe that after I wrote the std::string test this 
way I tried to also do the same for some of the container types (it may have 
actually been variant), and just gave up after I saw hold long it would take.

Nonetheless, I think there's definitely value in tests like this (for one, 
going through the implementation in this way makes it obvious how many corner 
cases need testing), and it's nice to see there's interest for these tests. 
I'll keep that in mind when working on future changes.

https://github.com/llvm/llvm-project/pull/97568
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to