Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-profgen / split-dwarf.test
blob09daea7f033dc712c733de670ebd93e94ab7c92c
1 ; RUN: rm -rf %t
2 ; RUN: mkdir -p %t
3 ; RUN: cd %t
5 ; RUN: echo -e "0\n0" > %t.prof
7 ; Test -gsplit-dwarf=single
8 ; RUN: cp %S/Inputs/split-dwarf-single.exe %t/split-dwarf-single.exe
9 ; RUN: yaml2obj %S/Inputs/split-dwarf-single.o.yaml -o %t/split-dwarf-single.o
10 ; RUN: llvm-profgen --format=text --unsymbolized-profile=%t.prof --binary=%t/split-dwarf-single.exe --output=%t1 --fill-zero-for-all-funcs
11 ; RUN: FileCheck %s --input-file %t1 --check-prefix=CHECK-SPLIT-DWARF
13 ; Test -gsplit-dwarf=split
14 ; RUN: cp %S/Inputs/split-dwarf-split.exe %t/split-dwarf-split.exe
15 ; RUN: yaml2obj %S/Inputs/split-dwarf-split.dwo.yaml -o %t/split-dwarf-split.dwo
16 ; RUN: llvm-profgen --format=text --unsymbolized-profile=%t.prof --binary=%t/split-dwarf-split.exe --output=%t2 --fill-zero-for-all-funcs
17 ; RUN: FileCheck %s --input-file %t2 --check-prefix=CHECK-SPLIT-DWARF
18 ; Test --dwp
19 ; RUN: llvm-dwp %t/split-dwarf-split.dwo -o %t/split-dwarf-split.dwp
20 ; RUN: llvm-profgen --format=text --unsymbolized-profile=%t.prof --dwp=%t/split-dwarf-split.dwp --binary=%t/split-dwarf-split.exe --output=%t3 --fill-zero-for-all-funcs
21 ; RUN: FileCheck %s --input-file %t3 --check-prefix=CHECK-SPLIT-DWARF
23 ; Make sure that all function ranges are well retrieved and have been populated with zero.
25 ; CHECK-SPLIT-DWARF:       foo:0:0
26 ; CHECK-SPLIT-DWARF-NEXT:   0: 0
27 ; CHECK-SPLIT-DWARF-NEXT:   1: 0
28 ; CHECK-SPLIT-DWARF-NEXT:  main:0:0
29 ; CHECK-SPLIT-DWARF-NEXT:   0: 0
30 ; CHECK-SPLIT-DWARF-NEXT:   1: 0
31 ; CHECK-SPLIT-DWARF-NEXT:   2: 0
34 ; Build instructions:
35 ; split-dwarf-single.o:       clang -gsplit-dwarf=single -fdebug-compilation-dir=.  test.c   -fdebug-info-for-profiling  -O0 -g -o split-dwarf-single.o -c
36 ; split-dwarf-single.exe:     clang -fdebug-compilation-dir=.  split-dwarf-single.o -o split-dwarf-single.exe  -fdebug-info-for-profiling  -O0 -g
38 ; split-dwarf-split.dwo:      clang -gsplit-dwarf=split -fdebug-compilation-dir=.  test.c  -fdebug-info-for-profiling  -O0 -g -o split-dwarf-split.o -c
39 ; split-dwarf-split.exe:      clang -fdebug-compilation-dir=.  split-dwarf-split.o -o split-dwarf-split.exe  -fdebug-info-for-profiling  -O0 -g
41 ; Source code:
43 int foo() {
44   return 1;
47 int main() {
48   foo();
49   return 0;