aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/debug-info-nodebug.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-04-27 22:18:46 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-04-27 22:18:46 +0000
commit1c6fc20608e70eea481285ed29e9131cd3652191 (patch)
tree949ddf99714a1a79ec94c1e693a561778c85ec10 /clang/test/CodeGenCXX/debug-info-nodebug.cpp
parent4b1dc5d60bb147b76a29260dc8362596063e6640 (diff)
downloadllvm-1c6fc20608e70eea481285ed29e9131cd3652191.zip
llvm-1c6fc20608e70eea481285ed29e9131cd3652191.tar.gz
llvm-1c6fc20608e70eea481285ed29e9131cd3652191.tar.bz2
Minor test simplification (per David Blaikie suggestion).
llvm-svn: 267804
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-nodebug.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-nodebug.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-nodebug.cpp b/clang/test/CodeGenCXX/debug-info-nodebug.cpp
index e2f5fb6..f4cab63 100644
--- a/clang/test/CodeGenCXX/debug-info-nodebug.cpp
+++ b/clang/test/CodeGenCXX/debug-info-nodebug.cpp
@@ -7,15 +7,6 @@
#define NODEBUG
#endif
-// Simple global variable declaration and definition.
-// Use the declaration so it gets emitted.
-NODEBUG int global_int_decl;
-NODEBUG int global_int_def = global_int_decl;
-// YESINFO-DAG: !DIGlobalVariable(name: "global_int_decl"
-// NOINFO-NOT: !DIGlobalVariable(name: "global_int_decl"
-// YESINFO-DAG: !DIGlobalVariable(name: "global_int_def"
-// NOINFO-NOT: !DIGlobalVariable(name: "global_int_def"
-
// Const global variable. Use it so it gets emitted.
NODEBUG static const int const_global_int_def = 1;
void func1(int);
@@ -41,15 +32,15 @@ struct S2 {
NODEBUG static const int static_const_member = 4;
};
int S2::static_member = 5;
-int junk = S2::static_const_member;
+void func3() { func1(S2::static_const_member); }
// YESINFO-DAG: !DIGlobalVariable(name: "static_member"
// NOINFO-NOT: !DIGlobalVariable(name: "static_member"
// YESINFO-DAG: !DIDerivedType({{.*}} name: "static_const_member"
// NOINFO-NOT: !DIDerivedType({{.*}} name: "static_const_member"
// Function-local static variable.
-void func3() {
- NODEBUG static int func_local = 6;
+void func4() {
+ NODEBUG static int static_local = 6;
}
-// YESINFO-DAG: !DIGlobalVariable(name: "func_local"
-// NOINFO-NOT: !DIGlobalVariable(name: "func_local"
+// YESINFO-DAG: !DIGlobalVariable(name: "static_local"
+// NOINFO-NOT: !DIGlobalVariable(name: "static_local"