[PATCH] D58612: Use std::atomic<> for static counters.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 25 05:47:51 PST 2019


ilya-biryukov added a comment.

In D58612#1408831 <https://reviews.llvm.org/D58612#1408831>, @riccibruno wrote:

> Hmm. These are not the only static variables which are used for statistics (eg: in `DeclBase.cpp`). Would it make sense instead to keep all of the statistics in the AST context (without making them atomic) ?


+1, the only reason to use atomics here instead is if getting hold of an actual `ASTContext` is hard where the statistics are used (for legacy reasons?).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58612





More information about the cfe-commits mailing list