[PATCH] D16135: Macro Debug Info support in Clang

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 7 11:12:26 PST 2017


On Tue, Feb 7, 2017 at 11:01 AM Amjad Aboud via Phabricator <
reviews at reviews.llvm.org> wrote:

> aaboud added a comment.
>
> In https://reviews.llvm.org/D16135#669416, @aprantl wrote:
>
> > In https://reviews.llvm.org/D16135#669045, @aaboud wrote:
> >
> > > Addressed Adrian last comments.
> > >  Added a LIT tests that covers all the macro kinds:
> > >
> > > 1. built-in (define)
> > > 2. command-line (define, include, undef)
> > > 3. main source (define, include, undef) Checked the above with and
> without PCH include.
> > >
> > >   Notice, that current implementation does not support debug info for
> macro definition and inclusion generated during the PCH file creation. To
> support that, we need to extend the PCH format to preserve this
> information. If you believe this feature is important, I will open a
> bugzilla ticket and we can handle it separately.
> >
> >
> > That would be a good idea and important to fix. I don't think we want
> the the generated code (or the debug info for that matter) to change just
> because the user decides to switch to PCH. Ideally turning on PCH should be
> transparent.
> >
> > I have one final question: What's the impact of this change on, e.g.,
> building clang?
> >
> > - How much does the build directory grow?
> > - Is there any noticeable compile time regression?
>
>
> I will run self-build and come back with answers for these questions.
> I am just wondering, if I build in debug mode, will it use the flag
> "-fstandalone-debug"?
>

I'm not sure it makes sense to motivate this feature with this flag. I'm
going to assume Darwin and FreeBSD don't want to implicitly pick up this
feature because of the default on their platforms which is really to
address a particular limitation in LLDB due to some other debug info.

So this probably needs a separate flag.


> This flag is set by default only for DarwinClang and FreeBSD, is there a
> way to assure it will be used with self-build?
>

You can add flags to your build by modifying your CMakeCache.txt file and
putting them int he CMAKE_CXX_FLAGS/CMAKE_C_FLAGS values (or the specific
ones for teh build mode you'd like them to go with, like the DEBUG build,
most likely)


> Notice that without this flag, there will be no debug info macro generated.
>
>
> https://reviews.llvm.org/D16135
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170207/b6dfcd32/attachment-0001.html>


More information about the cfe-commits mailing list