[cfe-dev] -p as an alias for -pg?

Jonathan Gray jsg at jsg.id.au
Fri Mar 16 16:32:56 PDT 2012


Is there any reason this couldn't be committed?

On Sun, Dec 18, 2011 at 05:24:12PM +1100, Jonathan Gray wrote:
> So it isn't clear if -p should be an alias of -pg everywhere
> or if it should be target specific.  With gcc on OpenBSD
> -p and -pg are the same.  But it seems on sysv unices,
> -p is for prof/mon.out instead of gprof/gmon.out formats,
> or was historically.
> 
> It isn't entirely obvious how to add an alias after the
> command is already added via TableGen.  So if the following
> isn't the way to go can someone give hints on how to
> do it in a way that is target specific?
> 
> Index: include/clang/Driver/Options.td
> ===================================================================
> --- include/clang/Driver/Options.td	(revision 146836)
> +++ include/clang/Driver/Options.td	(working copy)
> @@ -690,7 +690,7 @@
>  def private__bundle : Flag<"-private_bundle">;
>  def pthreads : Flag<"-pthreads">;
>  def pthread : Flag<"-pthread">;
> -def p : Flag<"-p">;
> +def p : Flag<"-p">, Alias<pg>;
>  def pie : Flag<"-pie">;
>  def read__only__relocs : Separate<"-read_only_relocs">;
>  def remap : Flag<"-remap">;
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list