]> granicus.if.org Git - clang/commit
PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types used via...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 5 Jun 2013 05:32:23 +0000 (05:32 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 5 Jun 2013 05:32:23 +0000 (05:32 +0000)
commit5f6e2f4010e1ebbc07231eff7c92e474e8912350
treeb2ffa7142b23e591a741fa5bb63d11256cbae74e
parent9adba39460dfa5282b75dbd27db44ccfb4d1f511
PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types used via typedefs

In an effort to make -flimit-debug-info more consistent I over-shot the
mark & made types used via typedefs never produce definitions in the
debug info (even if the type was used in a way that would require a
definition).

The fix for this is to do exactly what I was hoping to do at some point
- plumb the declaration/definition choice through the various layers of
"CreateType" in CGDebugInfo. In this way we can produce declarations
whenever they are sufficient & definitions otherwise - including when
qualifiers are used, for example (discovered in PR14467). This may not
be complete (there may be other types/situations where we need to
propagate the "declaration/definition" choice) but it lays the basic
foundation which we can enhance in future iterations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183296 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
test/CodeGenCXX/debug-info.cpp