[flang-commits] [clang] [flang] [FLANG][Driver] Support -fno-profile-generate and -fprofile-generate=<dir> in flang (PR #216643)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Aug 19 02:27:42 PDT 2026


================
@@ -497,8 +497,18 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
       opts.IsPIE = 1;
   }
 
-  if (args.hasArg(clang::options::OPT_fprofile_generate)) {
-    opts.setProfileInstr(llvm::driver::ProfileInstrKind::ProfileIRInstr);
+  if (const llvm::opt::Arg *a =
----------------
tblah wrote:

> Given the limited scope, would it be acceptable to keep the current approach for now and refactor into a shared function in CommonArgs.cpp once Flang's profiling support grows?

This sounds sensible to me but wait for Tarun's opinion

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


More information about the flang-commits mailing list