[PATCH] D44297: [lld-link] For suppressible warnings, print the suppressing flag.

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 02:46:34 PDT 2018


hans accepted this revision.
hans added inline comments.
This revision is now accepted and ready to land.


================
Comment at: COFF/Driver.cpp:809
       if (Config->WarnMissingOrderSymbol)
-        warn("/order:" + Arg + ": missing symbol: " + S);
+        warn("/order:" + Arg + ": missing symbol: " + S + " [no /ignore:4037]");
     }
----------------
thakis wrote:
> ruiu wrote:
> > thakis wrote:
> > > hans wrote:
> > > > Would it be helpful to make warn() take an optional warning number and tweak the message accordingly?
> > > > 
> > > > "no /ignore:1234" is a bit terse for my taste. How about "suppress with /ignore:1234" or "pass /ignore:1234 to suppress" or something similar?
> > > That's too word for me. I had "[/ignore:1245 to ignore]" but didn't like the redundant "ignore". I like the terse message, it's similar to how clang prints warning flags.
> > > 
> > > Making warn() responsible for this makes sense once we have more than 2 uses. For now, this seems ok to me.
> > "[no /ignore:4217]" is repeated a few times in this patch indeed, but I don't think that is too many to add a new parameter to warn(). I'm fine with what you did in this patch.
> Another idea would be to print [LNK4217] which is even terser and which finds the link.exe docs in search engines, but it's surprisingly difficult to find the /ignore: flag that way. (OTOH, with the /ignore:4217 it's hard to realize that the thing to search the web for is "lnk4217"). I don't have a strong preference between [no /ignore:4217] and [LNK4217], I probably weakly prefer the latter a bit. Hans, since you had an opinion on the spelling, wdyt?
It's hard to come up with anything terse that's also really clear.

[LNK1234] is really short, and also very compatible so maybe that's the way to go.


https://reviews.llvm.org/D44297





More information about the llvm-commits mailing list