r184693 - DebugInfo: Merge a bad debug info enum test into a good one
David Blaikie
dblaikie at gmail.com
Sun Jun 23 23:47:30 PDT 2013
Author: dblaikie
Date: Mon Jun 24 01:47:30 2013
New Revision: 184693
URL: http://llvm.org/viewvc/llvm-project?rev=184693&view=rev
Log:
DebugInfo: Merge a bad debug info enum test into a good one
The assembly generation testing has been moved to an LLVM test case.
Removed:
cfe/trunk/test/CodeGen/debug-info-enum.c
Modified:
cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp
Removed: cfe/trunk/test/CodeGen/debug-info-enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-enum.c?rev=184692&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-enum.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-enum.c (removed)
@@ -1,11 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o %t
-// RUN: grep DW_TAG_enumeration_type %t
-// Radar 8195980
-
-enum vtag {
- VT_ONE
-};
-
-int foo(int i) {
- return i == VT_ONE;
-}
Modified: cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp?rev=184693&r1=184692&r2=184693&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-enum.cpp Mon Jun 24 01:47:30 2013
@@ -1,8 +1,25 @@
-// RUN: %clang -fverbose-asm -S -g %s -o - | grep DW_TAG_enumeration_type
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
-int v;
-enum index { MAX };
-void foo(void)
-{
- v = MAX;
+// CHECK: [[ENUMS:![0-9]*]], {{[^,]*}}, {{[^,]*}}, {{[^,]*}}, {{[^,]*}}, {{[^,]*}}} ; [ DW_TAG_compile_unit ]
+// CHECK: [[ENUMS]] = metadata !{metadata [[E1:![0-9]*]], metadata [[E2:![0-9]*]]}
+
+namespace test1 {
+// CHECK: [[E1]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST1:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS:![0-9]*]], {{[^,]*}}, {{[^,]*}}} ; [ DW_TAG_enumeration_type ] [e]
+// CHECK: [[TEST1]] = {{.*}} ; [ DW_TAG_namespace ] [test1]
+// CHECK: [[TEST1_ENUMS]] = metadata !{metadata [[TEST1_E:![0-9]*]]}
+// CHECK: [[TEST1_E]] = {{.*}}, metadata !"E", i64 0} ; [ DW_TAG_enumerator ] [E :: 0]
+enum e { E };
+void foo() {
+ int v = E;
+}
+}
+
+namespace test2 {
+// rdar://8195980
+// CHECK: [[E2]] = metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST2:![0-9]*]], {{.*}}, metadata [[TEST1_ENUMS]], {{[^,]*}}, {{[^,]*}}} ; [ DW_TAG_enumeration_type ] [e]
+// CHECK: [[TEST2]] = {{.*}} ; [ DW_TAG_namespace ] [test2]
+enum e { E };
+bool func(int i) {
+ return i == E;
+}
}
More information about the cfe-commits
mailing list