1 // REQUIRES: x86-registered-target
2
3 // RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux-gnu \
4 // RUN: -flto=thin -emit-llvm-bc \
5 // RUN: -o %t.o %s
6
7 // RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \
8 // RUN: -o %t2.index \
9 // RUN: -r=%t.o,main,px
10
11 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
12 // RUN: -emit-obj -fthinlto-index=%t.o.thinlto.bc \
13 // RUN: -o %t.native.o -split-dwarf-file %t.file.dwo \
14 // RUN: -split-dwarf-output %t.output.dwo -x ir %t.o
15
16 // RUN: llvm-dwarfdump %t.native.o | FileCheck --check-prefix=DWARFv4-O %s
17 // RUN: llvm-dwarfdump %t.output.dwo | FileCheck --check-prefix=DWARFv4-DWO %s
18
19 // DWARFv4-O: DW_AT_GNU_dwo_name ("{{.*}}.file.dwo")
20 // DWARFv4-O-NOT: DW_TAG_subprogram
21 // DWARFv4-DWO: DW_TAG_subprogram
22
23 // RUN: %clang_cc1 -debug-info-kind=limited -dwarf-version=5 -triple x86_64-unknown-linux-gnu \
24 // RUN: -flto=thin -emit-llvm-bc \
25 // RUN: -o %t.o %s
26
27 // RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \
28 // RUN: -o %t2.index \
29 // RUN: -r=%t.o,main,px
30
31 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
32 // RUN: -emit-obj -fthinlto-index=%t.o.thinlto.bc \
33 // RUN: -o %t.native.o -dwarf-version=5 -split-dwarf-file %t.file.dwo \
34 // RUN: -split-dwarf-output %t.output.dwo -x ir %t.o
35
36 // RUN: llvm-dwarfdump %t.native.o | FileCheck --check-prefix=DWARFv5-O %s
37 // RUN: llvm-dwarfdump %t.output.dwo | FileCheck --check-prefix=DWARFv5-DWO %s
38
39 // DWARFv5-O: DW_AT_dwo_name ("{{.*}}.file.dwo")
40 // DWARFv5-O-NOT: DW_TAG_subprogram
41 // DWARFv5-DWO: DW_TAG_subprogram
42
main(void)43 int main(void) {}
44