[PATCH] D67388: Add a feature to dump dependency graph.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 03:23:36 PDT 2019


MaskRay added a comment.

In D67388#1664465 <https://reviews.llvm.org/D67388#1664465>, @grimar wrote:

> In D67388#1664463 <https://reviews.llvm.org/D67388#1664463>, @MaskRay wrote:
>
> > In D67388#1664420 <https://reviews.llvm.org/D67388#1664420>, @grimar wrote:
> >
> > > In D67388#1664414 <https://reviews.llvm.org/D67388#1664414>, @ruiu wrote:
> > >
> > > > In D67388#1664387 <https://reviews.llvm.org/D67388#1664387>, @grimar wrote:
> > > >
> > > > > I looked at the sample provided and I think that if I was a new user, I'd find not clear what is "<internal>" probably.
> > > > >  What about including something like "<internal> is usually a symbol defined by linker" line to the header?
> > > > >
> > > > > Also I am not sure what is situation now, but before we used to report "<internal>" for linker script defined symbols
> > > > >  in our messages sometimes. Would be nice to have a test for that case.
> > > >
> > > >
> > > > "<internal>" does not represent a symbol but a file. Ideally we should give more meaningful name for each virtual file, but I think that's beyond the scope of this patch.
> > >
> > >
> > > If it reports "<internal>" for a symbol from a linker script still - it should be mentioned in the header. Otherwise it might be not clear where a sybmol is coming from.
> >
> >
> > If we want to have a meaningful file name for synthesized sections, linker synthesized symbols, and `SymbolAssignment` symbols, we have to create a new `InputFile::Kind`
> >
> >   std::string lld::toString(const InputFile *f) {
> >     if (!f)  // this can be null for various reasons above
> >       return "<internal>";
> >
>
>
> I suggested the same previously: D45375 <https://reviews.llvm.org/D45375>


Interesting. So this current form of the patch is actually an alternative representation of the existing feature `--cref`. I wonder if we can change the output format of `--cref` and reuse the option name, or name it `--cref=format`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67388





More information about the llvm-commits mailing list