[Lldb-commits] [PATCH] D154128: [lldb] Add log indicating which kind of data formatter

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 30 11:03:48 PDT 2023


JDevlieghere added a comment.

In D154128#4461033 <https://reviews.llvm.org/D154128#4461033>, @augusto2112 wrote:

> I've bumped into this problem before, so really like this change. It's a bit sad that you'll only print the kind of data formatter once though, so someone reading the logs might have to jump back and forth to understand what kind of formatter they're dealing with. There's also `__PRETTY_FUNCTION__`, which shows the generic type parameters by default, but I think it's not a standard macro (although it's implemented by both clang and gcc). What do you think of having a macro like:
>
>   #ifndef __PRETTY_FUNCTION__
>      #define __PRETTY_FUNCTION__ __FUNCTION__
>   #endif

FWIW that's exactly what `LLVM_PRETTY_FUNCTION` does. It's implemented as you would expect (and you described): https://github.com/llvm/llvm-project/blob/5e2f0947c586042083cc1643f2aac90f2492bacb/llvm/include/llvm/Support/Compiler.h#L497


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154128



More information about the lldb-commits mailing list