llvm-project/lldb/source/DataFormatters
Enrico Granata e8daa2f843 Introduce the concept of a "display name" for types
Rationale:
Pretty simply, the idea is that sometimes type names are way too long and contain way too many details for the average developer to care about. For instance, a plain ol' vector of int might be shown as
std::__1::vector<int, std::__1::allocator<....
rather than the much simpler std::vector<int> form, which is what most developers would actually type in their code

Proposed solution:
Introduce a notion of "display name" and a corresponding API GetDisplayTypeName() to return such a crafted for visual representation type name
Obviously, the display name and the fully qualified (or "true") name are not necessarily the same - that's the whole point
LLDB could choose to pick the "display name" as its one true notion of a type name, and if somebody really needs the fully qualified version of it, let them deal with the problem
Or, LLDB could rename what it currently calls the "type name" to be the "display name", and add new APIs for the fully qualified name, making the display name the default choice

The choice that I am making here is that the type name will keep meaning the same, and people who want a type name suited for display will explicitly ask for one
It is the less risky/disruptive choice - and it should eventually make it fairly obvious when someone is asking for the wrong type

Caveats:
- for now, GetDisplayTypeName() == GetTypeName(), there is no logic to produce customized display type names yet.
- while the fully-qualified type name is still the main key to the kingdom of data formatters, if we start showing custom names to people, those should match formatters

llvm-svn: 209072
2014-05-17 19:14:17 +00:00
..
CF.cpp Rename eExecution*** to eExpression*** to be consistent with the result type. 2014-05-05 02:47:44 +00:00
CMakeLists.txt Fix CMake build by including ValueObjectPrinter.cpp in list of sources 2013-09-30 21:30:44 +00:00
CXXFormatterFunctions.cpp Better error reporting when a variable can't be 2014-02-28 22:27:53 +00:00
Cocoa.cpp <rdar://problem/16540961> 2014-04-10 18:17:30 +00:00
DataVisualization.cpp FormatNavigator has long stopped navigating anything - the generation of possible formatters matches is now done elsewhere 2013-12-20 09:38:13 +00:00
FormatCache.cpp This is the last piece of work for "formats in categories": we now cache formats as well as summaries and synthetics 2013-10-17 22:27:19 +00:00
FormatClasses.cpp <rdar://problem/15530080> 2013-11-22 00:02:13 +00:00
FormatManager.cpp Introduce the concept of a "display name" for types 2014-05-17 19:14:17 +00:00
LibCxx.cpp <rdar://problem/16424592> 2014-03-31 23:02:25 +00:00
LibCxxList.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
LibCxxMap.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
LibCxxUnorderedMap.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
LibStdcpp.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
Makefile Only enable RTTI for cxa_demangle.cpp 2013-02-15 02:36:40 +00:00
NSArray.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
NSDictionary.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
NSSet.cpp Fix Windows build using portable types for formatting the log outputs 2014-03-03 15:39:47 +00:00
TypeCategory.cpp All data formatters come in "match exact" and "match regex" styles 2013-12-20 11:32:26 +00:00
TypeCategoryMap.cpp <rdar://problem/15530080> 2013-11-22 00:02:13 +00:00
TypeFormat.cpp Better error reporting when a variable can't be 2014-02-28 22:27:53 +00:00
TypeSummary.cpp Allow summary formatters to take ValueObjects into account when deciding whether values/children should be printed and if child names should be shown 2014-04-23 23:16:25 +00:00
TypeSynthetic.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
ValueObjectPrinter.cpp Introduce the concept of a "display name" for types 2014-05-17 19:14:17 +00:00