[flang-commits] [clang] [flang] [lld] [llvm] [polly] [Option] Make Passes, Scalar, Instrumentation, and CGData options per-context (PR #232599)
Fangrui Song via flang-commits
flang-commits at lists.llvm.org
Fri Oct 16 20:58:31 PDT 2026
================
@@ -144,10 +144,13 @@ extern llvm::cl::opt<bool> ClSanitizeGuardChecks;
}
// Path and name of file used for profile generation
-static std::string getProfileGenName(const CodeGenOptions &CodeGenOpts) {
- std::string FileName = CodeGenOpts.InstrProfileOutput.empty()
- ? llvm::driver::getDefaultProfileGenName()
- : CodeGenOpts.InstrProfileOutput;
+static std::string
+getProfileGenName(const cl::LibraryOptionsContext &LibraryOptions,
----------------
MaskRay wrote:
In general we should prefer `const cl::LibraryOptionsContext &`. A nullable pointer is used in cases where no context supplies one - there are still many instances, like we still have many context-less `llvm::cl::ParseCommandLineOptions`. Follow-ups will try eliminate nullable pointers.
https://github.com/llvm/llvm-project/pull/232599
More information about the flang-commits
mailing list