summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp3
-rw-r--r--clang/test/CodeGenCXX/debug-info-cxx0x.cpp8
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index bccf6e77cd9..b23b3922222 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1374,6 +1374,9 @@ static QualType UnwrapTypeForDebugInfo(QualType T) {
case Type::SubstTemplateTypeParm:
T = cast<SubstTemplateTypeParmType>(T)->getReplacementType();
break;
+ case Type::Auto:
+ T = cast<AutoType>(T)->getDeducedType();
+ break;
}
assert(T != LastT && "Type unwrapping failed to unwrap!");
diff --git a/clang/test/CodeGenCXX/debug-info-cxx0x.cpp b/clang/test/CodeGenCXX/debug-info-cxx0x.cpp
new file mode 100644
index 00000000000..5753b05d728
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-cxx0x.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm-only -std=c++0x -g %s
+
+namespace PR9414 {
+ int f() {
+ auto x = 0;
+ return x;
+ }
+}
OpenPOWER on IntegriCloud