From 580da48a93ea3065cced426bb37df65a933c21f7 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran S Date: Fri, 2 May 2025 07:38:44 -0700 Subject: [flang][flang-driver] Support flag -finstrument-functions (#137996) --- flang/lib/Frontend/CompilerInvocation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 6f87a18..d6ba644 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -310,6 +310,9 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, args.filtered(clang::driver::options::OPT_fembed_offload_object_EQ)) opts.OffloadObjects.push_back(a->getValue()); + if (args.hasArg(clang::driver::options::OPT_finstrument_functions)) + opts.InstrumentFunctions = 1; + // -flto=full/thin option. if (const llvm::opt::Arg *a = args.getLastArg(clang::driver::options::OPT_flto_EQ)) { -- cgit v1.1