summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/debug-info-static-member.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-10-16 18:38:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-10-16 18:38:36 +0000
commitf5e9d8306929809595ba66ec3106bff18ec23f9f (patch)
tree84086c441a5aef2eab820d4abd2499364c965b25 /test/CodeGenCXX/debug-info-static-member.cpp
parent3c0dffc4e919ae8b96432e6cb8f7c53633b0c295 (diff)
DebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant value in this case as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-static-member.cpp')
-rw-r--r--test/CodeGenCXX/debug-info-static-member.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/CodeGenCXX/debug-info-static-member.cpp b/test/CodeGenCXX/debug-info-static-member.cpp
index 2a4f0c3dcd..cbe4acd4dd 100644
--- a/test/CodeGenCXX/debug-info-static-member.cpp
+++ b/test/CodeGenCXX/debug-info-static-member.cpp
@@ -48,10 +48,12 @@ int main()
// Verify that even when a static member declaration is created lazily when
// creating the definition, the declaration line is that of the canonical
-// declaration, not the definition.
+// declaration, not the definition. Also, since we look at the canonical
+// definition, we should also correctly emit the constant value (42) into the
+// debug info.
struct V {
virtual ~V(); // cause the definition of 'V' to be omitted by no-standalone-debug optimization
static const int const_va = 42;
};
-// CHECK: ; [ DW_TAG_member ] [const_va] [line [[@LINE-2]],
+// CHECK: i32 42} ; [ DW_TAG_member ] [const_va] [line [[@LINE-2]],
const int V::const_va;