[PATCH] D106334: Initialize common options in `getRegisteredOptions`

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 20:31:45 PDT 2021


dexonsmith added a comment.

In D106334#2889260 <https://reviews.llvm.org/D106334#2889260>, @zsrkmyn wrote:

> I'm not sure if we need a test for it. I tried to add one but the test passed even without this patch, as those options were already initialized before running the test.

Seems nice to have a test for this...

One idea would be to split this test out of SupportTests to avoid being affected by other tests' running the initializer... assuming that's what's preventing the test from being useful?

Another idea would be to add a new `llvm-clopt-test` executable that exposes this codepath somehow. The tool could check if the first command-line argument is `-register`, and avoid parsing the command-line in that case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106334



More information about the llvm-commits mailing list