r267909 - Make the test exercise all paths modified in r267746.
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 10:52:28 PDT 2016
Author: probinson
Date: Thu Apr 28 12:52:28 2016
New Revision: 267909
URL: http://llvm.org/viewvc/llvm-project?rev=267909&view=rev
Log:
Make the test exercise all paths modified in r267746.
Modified:
cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpp
Modified: cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpp?rev=267909&r1=267908&r2=267909&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-nodebug.cpp Thu Apr 28 12:52:28 2016
@@ -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"
More information about the cfe-commits
mailing list