================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to