2 for FILE in `seq 2`; do
3 clang -g -c odr-anon-namespace.cpp -DFILE$FILE -o odr-anon-namespace/$FILE.o
7 // RUN: dsymutil -f -oso-prepend-path=%p/../Inputs/odr-anon-namespace -y %p/dummy-debug-map.map -o - | llvm-dwarfdump -debug-info - | FileCheck %s
10 // Currently dsymutil will unique the contents of anonymous
11 // namespaces if they are from the same file/line. Force this
12 // namespace to appear different eventhough it's the same (this
13 // uniquing is actually a bug kept for backward compatibility, see the
14 // comments in DeclContextTree::getChildDeclContext()).
25 // Keep the ifdef guards for FILE1 and FILE2 even if all the code is
26 // above to clearly show what the CHECK lines are testing.
29 // CHECK: TAG_compile_unit
31 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
33 // CHECK: DW_TAG_variable
35 // CHECK: DW_AT_name {{.*}}"c"
37 // CHECK: DW_AT_type {{.*}}0x00000000[[C_FILE1:[0-9a-f]*]]
39 // CHECK: DW_TAG_namespace
40 // CHECK-NOT: {{DW_AT_name|NULL|DW_TAG}}
41 // CHECK: 0x[[C_FILE1]]:{{.*}}DW_TAG_class_type
43 // CHECK: DW_AT_name{{.*}}"C"
47 // CHECK: TAG_compile_unit
49 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
51 // CHECK: DW_TAG_variable
53 // CHECK: DW_AT_name {{.*}}"c"
55 // CHECK: DW_AT_type {{.*}}0x00000000[[C_FILE2:[0-9a-f]*]]
57 // CHECK: DW_TAG_namespace
58 // CHECK-NOT: {{DW_AT_name|NULL|DW_TAG}}
59 // CHECK: 0x[[C_FILE2]]:{{.*}}DW_TAG_class_type
61 // CHECK: DW_AT_name{{.*}}"C"
64 #error "You must define which file you generate"