summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/debug-info-nodebug.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-04-28 17:52:28 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-04-28 17:52:28 +0000
commit2988dcc7837f3bea6187c641625a1a12c047a6ce (patch)
tree5bd12f5927cf244256f2efcb90ca16b3976e7c36 /test/CodeGenCXX/debug-info-nodebug.cpp
parentcfd3e631e7b1dff53d4b80fdf8b277babafe96c0 (diff)
Make the test exercise all paths modified in r267746.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-nodebug.cpp')
-rw-r--r--test/CodeGenCXX/debug-info-nodebug.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGenCXX/debug-info-nodebug.cpp b/test/CodeGenCXX/debug-info-nodebug.cpp
index f4cab6390d..7a10e6708c 100644
--- a/test/CodeGenCXX/debug-info-nodebug.cpp
+++ b/test/CodeGenCXX/debug-info-nodebug.cpp
@@ -27,12 +27,18 @@ NODEBUG S1 global_struct = { 2, 3 };
// NOINFO-NOT: !DIGlobalVariable(name: "global_struct"
// Static data members. Const member needs a use.
+// Also the class as a whole needs a use, so that we produce debug info for
+// the entire class (iterating over the members, demonstrably skipping those
+// with 'nodebug').
struct S2 {
NODEBUG static int static_member;
NODEBUG static const int static_const_member = 4;
};
int S2::static_member = 5;
-void func3() { func1(S2::static_const_member); }
+void func3() {
+ S2 junk;
+ func1(S2::static_const_member);
+}
// YESINFO-DAG: !DIGlobalVariable(name: "static_member"
// NOINFO-NOT: !DIGlobalVariable(name: "static_member"
// YESINFO-DAG: !DIDerivedType({{.*}} name: "static_const_member"