[llvm-commits] [debuginfo-tests] r131442 - /debuginfo-tests/trunk/nested-struct.cpp
Devang Patel
dpatel at apple.com
Mon May 16 17:20:50 PDT 2011
Author: dpatel
Date: Mon May 16 19:20:50 2011
New Revision: 131442
URL: http://llvm.org/viewvc/llvm-project?rev=131442&view=rev
Log:
Test case for r131441.
Added:
debuginfo-tests/trunk/nested-struct.cpp
Added: debuginfo-tests/trunk/nested-struct.cpp
URL: http://llvm.org/viewvc/llvm-project/debuginfo-tests/trunk/nested-struct.cpp?rev=131442&view=auto
==============================================================================
--- debuginfo-tests/trunk/nested-struct.cpp (added)
+++ debuginfo-tests/trunk/nested-struct.cpp Mon May 16 19:20:50 2011
@@ -0,0 +1,21 @@
+// RUN: %clangxx -O0 -g %s -c -o %t.o
+// RUN: %test_debuginfo %s %t.o
+// Radar 9440721
+// If debug info for my_number() is emitted outside function foo's scope
+// then a debugger may not be able to handle it. At least one version of
+// gdb crashes in such cases.
+
+// DEBUGGER: ptype foo
+// CHECK: type = int (void)
+
+int foo() {
+ struct Local {
+ static int my_number() {
+ return 42;
+ }
+ };
+
+ int i = 0;
+ i = Local::my_number();
+ return i + 1;
+}
More information about the llvm-commits
mailing list