File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 51
51
// RUN: not %clang -target powerpc64-ibm-aix-xcoff -gdwarf-5 -S -emit-llvm -o - %s 2>&1| \
52
52
// RUN: FileCheck %s --check-prefix=UNSUPPORTED-VER5
53
53
54
+ // Check what version of dwarf is used to emit debug info when compiling ir with clang.
55
+ // RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s \
56
+ // RUN: | %clang -target x86_64-linux-gnu -gdwarf-4 -x ir -c -o - - \
57
+ // RUN: | llvm-dwarfdump -v - \
58
+ // RUN: | FileCheck %s --check-prefix=SINGLE-4
59
+ // RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s \
60
+ // RUN: | %clang -target x86_64-linux-gnu -g -x ir -c -o - - \
61
+ // RUN: | llvm-dwarfdump -v - \
62
+ // RUN: | FileCheck %s --check-prefix=SINGLE-5
63
+
54
64
int main (void ) {
55
65
return 0 ;
56
66
}
@@ -67,3 +77,11 @@ int main (void) {
67
77
// CODEVIEW: !{i32 2, !"CodeView", i32 1}
68
78
// NOCODEVIEW-NOT: !"CodeView"
69
79
// NODWARF-NOT: !"Dwarf Version"
80
+
81
+ // SINGLE-4: .debug_info contents:
82
+ // SINGLE-4: 0x00000000: Compile Unit: {{.*}} version = 0x0004, abbr_offset
83
+ // SINGLE-4: 0x0000000b: DW_TAG_compile_unit
84
+
85
+ // SINGLE-5: .debug_info contents:
86
+ // SINGLE-5: 0x00000000: Compile Unit: {{.*}} version = 0x0005, unit_type = DW_UT_compile, abbr_offset
87
+ // SINGLE-5: 0x0000000c: DW_TAG_compile_unit
You can’t perform that action at this time.
0 commit comments