[Lldb-commits] [PATCH] D117490: [lldb] Make logging machinery type-safe

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 21 09:25:58 PST 2022


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Utility/Log.h:57
+  /// };
+  using MaskType = uint32_t;
+
----------------
Didn't this all start with Greg wanting to make this a `uint64_t`?


================
Comment at: lldb/include/lldb/Utility/Logging.h:19-50
+  API = Log::ChannelFlag<0>,
+  AST = Log::ChannelFlag<1>,
+  Breakpoints = Log::ChannelFlag<2>,
+  Commands = Log::ChannelFlag<3>,
+  Communication = Log::ChannelFlag<4>,
+  Connection = Log::ChannelFlag<5>,
+  DataFormatters = Log::ChannelFlag<6>,
----------------
I would put this into a `.def` file and have it generate both this list as well as the one with the macros below. The last entry is annoying. We could either omit it from the list but then you risk someone updating the def file but not this. I don't think there's a way to do this automatically? Maybe just an additional define? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117490



More information about the lldb-commits mailing list