r219943 - DebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant value in this case as well.

David Blaikie dblaikie at gmail.com
Thu Oct 16 11:38:37 PDT 2014


Author: dblaikie
Date: Thu Oct 16 13:38:36 2014
New Revision: 219943

URL: http://llvm.org/viewvc/llvm-project?rev=219943&view=rev
Log:
DebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant value in this case as well.

Modified:
    cfe/trunk/test/CodeGenCXX/debug-info-static-member.cpp

Modified: cfe/trunk/test/CodeGenCXX/debug-info-static-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-static-member.cpp?rev=219943&r1=219942&r2=219943&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-static-member.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-static-member.cpp Thu Oct 16 13:38:36 2014
@@ -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;





More information about the cfe-commits mailing list