summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-02-22 00:13:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-02-22 00:13:14 +0000
commita0abc4291178d97662f9b346863f692ecc72c803 (patch)
treed9c13d9a580c528d81fa8f2be43dde0d619b6e00 /clang/lib/CodeGen/CGDebugInfo.cpp
parent98eafd67d5657d4d8f28996b32a24235e4396dc7 (diff)
downloadbcm5719-llvm-a0abc4291178d97662f9b346863f692ecc72c803.tar.gz
bcm5719-llvm-a0abc4291178d97662f9b346863f692ecc72c803.zip
Fix assertion failure when generating debug information for a variable
declaration declared using class template argument deduction. Patch by Eric Fiselier (who is busy and asked me to commit this on his behalf)! Differential Revision: https://reviews.llvm.org/D30082 llvm-svn: 295794
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 252ee8d71d9..acfe0a4d7d0 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2475,8 +2475,9 @@ static QualType UnwrapTypeForDebugInfo(QualType T, const ASTContext &C) {
case Type::SubstTemplateTypeParm:
T = cast<SubstTemplateTypeParmType>(T)->getReplacementType();
break;
- case Type::Auto: {
- QualType DT = cast<AutoType>(T)->getDeducedType();
+ case Type::Auto:
+ case Type::DeducedTemplateSpecialization: {
+ QualType DT = cast<DeducedType>(T)->getDeducedType();
assert(!DT.isNull() && "Undeduced types shouldn't reach here.");
T = DT;
break;
OpenPOWER on IntegriCloud