Michael137 wrote:

LGTM

> As far as I know there are some 
> [plans](https://discourse.llvm.org/t/rfc-lldb-moving-libc-data-formatters-out-of-lldb/89591)
>  to move out libcxx formatters of LLDB. So from this perspective, some code 
> duplication seems reasonable to me, since only the libstdcxx part will be 
> used in the future.

Yea even without those plans, if either of the STLs ever changes the layout, a 
generic summary provider immediately becomes more complex to untangle. As much 
as i dislike code duplication, in my opinion, the formatters are the place 
where that actually makes maintenance a bit simpler.

FWIW, the names `_M_file_name`/`_M_function_name`/`_M_line`/`_M_column` go 
against the typical libc++ naming convention. These names are [hardcoded in 
Clang](https://github.com/llvm/llvm-project/blob/951c67d4dbed4f87f366f1f911bc061bc6da1912/clang/lib/AST/Expr.cpp#L2367-L2387)
 (presumably because it's supposed to work with libstdc++).

In that sense, these are likely to never diverge. But for consistency with 
other formatters, probably still best to keep them separate

https://github.com/llvm/llvm-project/pull/203185
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to