[PATCH] D23056: Adding test for DIMacro and DIMacroFile comparison implementation

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 09:15:55 PDT 2016


On Thu, Aug 4, 2016 at 8:55 AM Amjad Aboud <amjad.aboud at intel.com> wrote:

> aaboud added a comment.
>
> > Side note: Is there any reason we're creating DIMacroFiles that have no
> macros in them? Or are they unnecessary?
>
>
>
>
> 1. GCC does that too.
> 2. It is implementation details, because we create the DIMacroFile before
> we parse its content, thus at that point we do not know if it will contain
> macros or not.
>

Presumably we know when we've finished the DIMacroFile (so we stop putting
macros in that file), so perhaps we could defer adding the DIMacroFile to
its parent until that point - and if we find that there's nothing in it at
that point, just not to add it at all.

Anyway *shrug* just an optimization for some time, if you're interested or
you find this has memory problems, etc.


>
>
> https://reviews.llvm.org/D23056
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160804/569a35e3/attachment.html>


More information about the llvm-commits mailing list