diff options
author | Paul Robinson <paul.robinson@sony.com> | 2016-04-28 17:52:28 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2016-04-28 17:52:28 +0000 |
commit | 9253135c153e16da9eae056a7d16a85656bb633e (patch) | |
tree | c6b6590d2f30fffcb1b9316612088020e3c49374 /clang/test/CodeGenCXX/debug-info-nodebug.cpp | |
parent | 62d5e473ce722145f76935e04ea3f613763b2f63 (diff) | |
download | llvm-9253135c153e16da9eae056a7d16a85656bb633e.zip llvm-9253135c153e16da9eae056a7d16a85656bb633e.tar.gz llvm-9253135c153e16da9eae056a7d16a85656bb633e.tar.bz2 |
Make the test exercise all paths modified in r267746.
llvm-svn: 267909
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-nodebug.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-nodebug.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-nodebug.cpp index f4cab63..7a10e67 100644 --- a/clang/test/CodeGenCXX/debug-info-nodebug.cpp +++ b/clang/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" |