From ba397fe24468fae6cb46f259a3f946770163bfe2 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 6 Nov 2009 18:45:16 +0000 Subject: [PATCH] Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86274 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 11 +++++++++++ test/CodeGenCXX/debug-info.cpp | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 test/CodeGenCXX/debug-info.cpp 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(Ty)->getUnderlyingType(), Unit); case Type::Decltype: return getOrCreateType(cast(Ty)->getUnderlyingType(), Unit); + + case Type::QualifiedName: { + const QualifiedNameType *T = cast(Ty); + return CreateTypeNode(T->getNamedType(), Unit); + } + + case Type::SubstTemplateTypeParm: { + const SubstTemplateTypeParmType *T = cast(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 struct Identity { + typedef T Type; +}; + +void f(Identity::Type a) {} -- 2.50.1