[PATCH] D137753: [Clang][AIX][p]Enable -p Functionality

David Tenty via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 24 10:50:03 PST 2023


daltenty added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:4141
   HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>;
+def p : Flag<["-"], "p">, HelpText<"Enable mcount instrumentation with prof">, Flags<[CC1Option]>;
 def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>,
----------------
Why is this a cc1 option if it's not used in CC1?


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:274
 
-    if (Args.hasArg(options::OPT_pg)) {
+    if (Args.hasArg(options::OPT_p, options::OPT_pg)) {
       CmdArgs.push_back(Args.MakeArgString((llvm::Twine("-L") + D.SysRoot) +
----------------
Maybe I'm a bit confused, I though these options had different handling with respect to the paths? Otherwise, it's simply an alias.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137753/new/

https://reviews.llvm.org/D137753



More information about the cfe-commits mailing list