summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-05-24 21:24:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-05-24 21:24:35 +0000
commit22c460a0511c98431ae58a501a944cb27965228a (patch)
treedff5d17bdfd6a90047b0db220a30a85bc27878f9 /clang/lib/CodeGen/CGDebugInfo.cpp
parent4fd69975aabdf7520685f1687a91bb313931a25f (diff)
downloadbcm5719-llvm-22c460a0511c98431ae58a501a944cb27965228a.tar.gz
bcm5719-llvm-22c460a0511c98431ae58a501a944cb27965228a.zip
PR16091: Error when attempting to emit debug info for undeduced auto return types
Perhaps we should just suppress this, rather than erroring, but since we have the infrastructure for it I figured I'd use it - if this is determined to be not the right thing we should probably remove that infrastructure entirely. I guess it's lying around from the early days of implementing debug info support. llvm-svn: 182673
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 561490d25be..e5c3a053b50 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1827,7 +1827,10 @@ static QualType UnwrapTypeForDebugInfo(QualType T, const ASTContext &C) {
T = cast<SubstTemplateTypeParmType>(T)->getReplacementType();
break;
case Type::Auto:
- T = cast<AutoType>(T)->getDeducedType();
+ QualType DT = cast<AutoType>(T)->getDeducedType();
+ if (DT.isNull())
+ return T;
+ T = DT;
break;
}
@@ -2044,8 +2047,10 @@ llvm::DIType CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile Unit) {
case Type::TypeOf:
case Type::Decltype:
case Type::UnaryTransform:
- case Type::Auto:
llvm_unreachable("type should have been unwrapped!");
+ case Type::Auto:
+ Diag = "auto";
+ break;
}
assert(Diag && "Fall through without a diagnostic?");
OpenPOWER on IntegriCloud