wallace added inline comments.

================
Comment at: lldb/source/Plugins/Process/Linux/Procfs.cpp:12
 #include "lldb/Host/linux/Support.h"
+
 #include "llvm/Support/MemoryBuffer.h"
----------------
labath wrote:
> btw, llvm does not generally put blank lines between include headers. 
> omitting those lets clang format reorder everything according to the [[ 
> https://llvm.org/docs/CodingStandards.html#include-style | official style ]].
oh, i didn't know that clang-format ensures that style guideline. Thanks!


================
Comment at: lldb/source/Plugins/Process/Linux/Procfs.cpp:22-26
+  static Optional<ErrorOr<std::unique_ptr<MemoryBuffer>>> cpu_info_or_err;
+  static llvm::once_flag g_once_flag;
+
+  llvm::call_once(g_once_flag,
+                  [] { cpu_info_or_err = getProcFile("cpuinfo"); });
----------------
labath wrote:
> And why not this?
i didn't know that local static initializations are ensured by the compiler not 
to have race conditions. TIL
I'll just do what you are suggesting here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131081

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to