jingham created this revision. jingham added a reviewer: labath. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
This is a handy and powerful addition to the logging system, but not at all discoverable. This is a trivial patch, but since I don't actually know much about these formatters I put it up for review in case there's more useful detail to add or people can think of a better place to put this. Repository: rLLDB LLDB https://reviews.llvm.org/D65293 Files: lldb/include/lldb/Utility/Log.h Index: lldb/include/lldb/Utility/Log.h =================================================================== --- lldb/include/lldb/Utility/Log.h +++ lldb/include/lldb/Utility/Log.h @@ -206,6 +206,11 @@ } // namespace lldb_private +/// The LLDB_LOG macro uses the llvm::formatv system (see the ProgrammersManual page in the +/// llvm docs for more details). This allows the use of "format_providers" to auto-format some of the +/// llvm and lldb datatypes. If you need to do non-trivial formatting of one of these types, +/// be sure to grep the lldb and llvm sources for format_provider to see if there is already a formatter +/// before doing in situ formatting, and feel free to add a provider if one does not exist. #define LLDB_LOG(log, ...) \ do { \ ::lldb_private::Log *log_private = (log); \
Index: lldb/include/lldb/Utility/Log.h =================================================================== --- lldb/include/lldb/Utility/Log.h +++ lldb/include/lldb/Utility/Log.h @@ -206,6 +206,11 @@ } // namespace lldb_private +/// The LLDB_LOG macro uses the llvm::formatv system (see the ProgrammersManual page in the +/// llvm docs for more details). This allows the use of "format_providers" to auto-format some of the +/// llvm and lldb datatypes. If you need to do non-trivial formatting of one of these types, +/// be sure to grep the lldb and llvm sources for format_provider to see if there is already a formatter +/// before doing in situ formatting, and feel free to add a provider if one does not exist. #define LLDB_LOG(log, ...) \ do { \ ::lldb_private::Log *log_private = (log); \
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits