Module Debugging: Fix the condition for determining whether a template
authorAdrian Prantl <aprantl@apple.com>
Mon, 25 Apr 2016 20:52:40 +0000 (20:52 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 25 Apr 2016 20:52:40 +0000 (20:52 +0000)
commit05fefa4a85cbafe99834ba02a96933e7fc65ec25
tree5b880aeef36182b7b547afc31dac42ee6606e815
parentcef04a25f65b1759063b3ea3cda81e6a7afc5427
Module Debugging: Fix the condition for determining whether a template
instantiation is in a module.

This patch fixes the condition for determining whether the debug info for a
template instantiation will exist in an imported clang module by:

- checking whether the ClassTemplateSpecializationDecl is complete and
- checking that the instantiation was in a module by looking at the first field.

I also added a negative check to make sure that a typedef to a forward-declared
template (with the definition outside of the module) is handled correctly.

http://reviews.llvm.org/D19443
rdar://problem/25553724

llvm-svn: 267464
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/Modules/ExtDebugInfo.cpp
clang/test/Modules/Inputs/DebugCXX.h
clang/test/Modules/ModuleDebugInfo.cpp