[PATCH] D57679: [LLD] [MinGW] Hook up the --no-insert-timestamp option

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 17:43:04 PST 2019


On Tue, Feb 5, 2019 at 12:15 PM Martin Storsjö <martin at martin.st> wrote:

> On Tue, 5 Feb 2019, Rui Ueyama wrote:
>
> > For completeness, why don't you add both -insert-timestamp and
> > -no-insert-timestamp?
>
> To be honest, I hadn't really looked much into these options, I just added
> a testcase to the patch the original author had posted on bugzilla.
>
> Would that then be e.g. something like this?
>
>    if (auto *Arg = Args.getLastArg(OPT_insert_timestamp,
>                                    OPT_no_insert_timestamp))
>      if (Arg->getOption().getID() == OPT_no_insert_timestamp)
>        Add("-timestamp:0");
>

Args has a convenient function, so the code can be:

if (Args.hasFlag(OPT_insert_timestamp, OPT_no_insert_timestamp, false))


>
> // Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/4cbd4fd9/attachment.html>


More information about the llvm-commits mailing list