[PATCH] D105959: Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer

Mehdi AMINI via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 15 19:32:45 PDT 2021


mehdi_amini added a comment.

In D105959#2882099 <https://reviews.llvm.org/D105959#2882099>, @bondhugula wrote:

> This is a really welcome change! Multiple registration issues were really an inconvenience - I had no clue this was the pattern to use to fix it. Thanks!

To be fair: we can do it transparently only for libSupport, as it contains the entry point for command line parsing it can explicitly trigger the registration of the options for itself. Other libraries in LLVM don't have this luxury...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105959



More information about the cfe-commits mailing list