[Lldb-commits] [PATCH] D72133: Data formatters: Look through array element typedefs

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 6 14:07:13 PST 2020


clayborg added a comment.

So as long as the following are true from this patch I am ok:

- if I ask for the array element type of "str" in the test that was added, it should return "MCHAR". We shouldn't be removing any typedefs from the type. The user can call SBType::GetCanonicalType() if they need to (or equivalent with internal APIs)
- If there are no formatters for "MCHAR[]" we can fall back to "char[]".
- If there are no formatters for "MMCHAR[]" from my example we fall back to the _first_ array formatter that supports the array of typedefs, or back to the the array of canonical types. Only the first array based formatter should be returned as the desired formatter

This patch seems to redefine what getting the element type of an array is which seems wrong to me. We just need to make the code that uses these APIs smarter.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72133/new/

https://reviews.llvm.org/D72133





More information about the lldb-commits mailing list