[DebugInfo] Deduplicate debug info limiting logic
authorReid Kleckner <rnk@google.com>
Tue, 13 Sep 2016 00:01:23 +0000 (00:01 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 13 Sep 2016 00:01:23 +0000 (00:01 +0000)
commit6c7b1c62126cea0146777b878a4516aa23073ae2
tree8ed58cedc055ae45c7d17ec8db8c4711e3dd234b
parentf8f632498307d22e10fab0704548b270b15f1e1e
[DebugInfo] Deduplicate debug info limiting logic

We should be doing the same checks when a type is completed as we do
when a complete type is used during emission. Previously, we duplicated
the logic, and it got out of sync. This could be observed with
dllimported classes.

Also reduce a test case for this slightly.

Implementing review feedback from David Blaikie on r281057.

llvm-svn: 281278
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-class-nolimit.cpp
clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp