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 --linker parallel -f \
8 // RUN: -oso-prepend-path=%p/../../Inputs/odr-anon-namespace \
9 // RUN: -y %p/../dummy-debug-map.map -o - | \
10 // RUN: llvm-dwarfdump -debug-info - | FileCheck %s
13 // Currently dsymutil will unique the contents of anonymous
14 // namespaces if they are from the same file/line. Force this
15 // namespace to appear different eventhough it's the same (this
16 // uniquing is actually a bug kept for backward compatibility, see the
17 // comments in DeclContextTree::getChildDeclContext()).
28 // Keep the ifdef guards for FILE1 and FILE2 even if all the code is
29 // above to clearly show what the CHECK lines are testing.
32 // CHECK: TAG_compile_unit
34 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
36 // CHECK: DW_TAG_variable
38 // CHECK: DW_AT_name {{.*}}"c"
40 // CHECK: DW_AT_type {{.*}}0x[[C_FILE1:[0-9a-f]*]]
42 // CHECK: DW_TAG_namespace
43 // CHECK-NOT: {{DW_AT_name|NULL|DW_TAG}}
44 // CHECK: 0x[[C_FILE1]]:{{.*}}DW_TAG_class_type
46 // CHECK: DW_AT_name{{.*}}"C"
50 // CHECK: TAG_compile_unit
52 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
54 // CHECK: DW_TAG_variable
56 // CHECK: DW_AT_name {{.*}}"c"
58 // CHECK: DW_AT_type {{.*}}0x[[C_FILE2:[0-9a-f]*]]
60 // CHECK: DW_TAG_namespace
61 // CHECK-NOT: {{DW_AT_name|NULL|DW_TAG}}
62 // CHECK: 0x[[C_FILE2]]:{{.*}}DW_TAG_class_type
64 // CHECK: DW_AT_name{{.*}}"C"
67 #error "You must define which file you generate"