diff options
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 11 | ||||
-rw-r--r-- | test/CodeGenCXX/debug-info.cpp | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index c772a006f5..e7e581b00a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -879,6 +879,17 @@ llvm::DIType CGDebugInfo::CreateTypeNode(QualType Ty, return getOrCreateType(cast<TypeOfType>(Ty)->getUnderlyingType(), Unit); case Type::Decltype: return getOrCreateType(cast<DecltypeType>(Ty)->getUnderlyingType(), Unit); + + case Type::QualifiedName: { + const QualifiedNameType *T = cast<QualifiedNameType>(Ty); + return CreateTypeNode(T->getNamedType(), Unit); + } + + case Type::SubstTemplateTypeParm: { + const SubstTemplateTypeParmType *T = cast<SubstTemplateTypeParmType>(Ty); + return CreateTypeNode(T->getReplacementType(), Unit); + } + } } diff --git a/test/CodeGenCXX/debug-info.cpp b/test/CodeGenCXX/debug-info.cpp new file mode 100644 index 0000000000..2a141857cf --- /dev/null +++ b/test/CodeGenCXX/debug-info.cpp @@ -0,0 +1,6 @@ +// RUN: clang-cc -emit-llvm-only -g +template<typename T> struct Identity { + typedef T Type; +}; + +void f(Identity<int>::Type a) {} |