[llvm] [LV] Nest cl::opts under namespace llvm (NFC) (PR #221891)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 01:10:17 PDT 2026


================
@@ -51,6 +51,9 @@
 
 namespace llvm {
 
+LLVM_ABI extern cl::opt<unsigned> NumberOfStoresToPredicate;
+LLVM_ABI extern cl::opt<bool> VPlanBuildOuterloopStressTest;
----------------
artagnon wrote:

I think the existing practice is to put them in the header, not because it's necessary for the build, but because it helps clang tooling find references -- from VPlanTransforms.h:

```cpp
LLVM_ABI_FOR_TEST extern cl::opt<bool> VerifyEachVPlan;

#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_ABI_FOR_TEST extern cl::opt<bool> VPlanPrintBeforeAll;
LLVM_ABI_FOR_TEST extern cl::opt<bool> VPlanPrintAfterAll;
LLVM_ABI_FOR_TEST extern cl::list<std::string> VPlanPrintBeforePasses;
LLVM_ABI_FOR_TEST extern cl::list<std::string> VPlanPrintAfterPasses;
LLVM_ABI_FOR_TEST extern cl::opt<bool> VPlanPrintVectorRegionScope;
#endif
```

https://github.com/llvm/llvm-project/pull/221891


More information about the llvm-commits mailing list