[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / dsymutil / X86 / odr-anon-namespace.cpp
blob0bca8f4592c7f1de8e26f2c070de86c2777fe8d7
1 /* Compile with:
2 for FILE in `seq 2`; do
3 clang -g -c odr-anon-namespace.cpp -DFILE$FILE -o odr-anon-namespace/$FILE.o
4 done
5 */
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
9 #ifdef FILE1
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()).
15 #line 42
16 #endif
17 namespace {
18 class C {};
21 void foo() {
22 C c;
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.
27 #ifdef FILE1
29 // CHECK: TAG_compile_unit
30 // CHECK-NOT: DW_TAG
31 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
33 // CHECK: DW_TAG_variable
34 // CHECK-NOT: DW_TAG
35 // CHECK: DW_AT_name {{.*}}"c"
36 // CHECK-NOT: DW_TAG
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
42 // CHECK-NOT: DW_TAG
43 // CHECK: DW_AT_name{{.*}}"C"
45 #elif defined(FILE2)
47 // CHECK: TAG_compile_unit
48 // CHECK-NOT: DW_TAG
49 // CHECK: AT_name{{.*}}"odr-anon-namespace.cpp"
51 // CHECK: DW_TAG_variable
52 // CHECK-NOT: DW_TAG
53 // CHECK: DW_AT_name {{.*}}"c"
54 // CHECK-NOT: DW_TAG
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
60 // CHECK-NOT: DW_TAG
61 // CHECK: DW_AT_name{{.*}}"C"
63 #else
64 #error "You must define which file you generate"
65 #endif