File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < cstdio>
2+
3+ extern " C" void foo () { printf (" Hello from second CU!\n " ); }
Original file line number Diff line number Diff line change 1+ // Check that BOLT correctly generates debug line comments for DWARF-5.
2+
3+ // REQUIRES: system-linux
4+
5+ // RUN: %clang -g -gdwarf-5 -O0 -xc++ %s -o %t.exe
6+ // RUN: llvm-bolt %t.exe --update-debug-sections --print-debug-info \
7+ // RUN: --print-after-lowering -o %t.bolt | FileCheck %s
8+
9+ // CHECK: pushq %rbp # debug line {{.*}}dwarf5-debug-line-print.test:11
10+
11+ int main(){
12+ int x = 0;
13+ return 0;
14+ }
Original file line number Diff line number Diff line change 1+ // Check that BOLT correctly handles two CUs with DWARF-5 debug info (does not crash).
2+
3+ // REQUIRES: system-linux
4+
5+ // RUN: %clang -g -gdwarf-5 -O1 -xc++ %s -o %t-main.o -c
6+ // RUN: %clang -g -gdwarf-5 -O1 -xc++ %S/Inputs/dwarf5-two-cus-foo.cpp -o %t-foo.o -c
7+ // RUN: %clang %t-main.o %t-foo.o -o %t.exe
8+ // RUN: llvm-bolt %t.exe --update-debug-sections --force-inline=foo \
9+ // RUN: -o %t.bolt | FileCheck %s
10+
11+ // CHECK-NOT: BOLT-ERROR
12+ // CHECK-NOT: BOLT-WARNING
13+ // CHECK: BOLT-INFO: inlined {{[0-9]+}} calls at {{[1-9][0-9]*}} call sites
14+
15+ extern "C" void foo();
16+
17+ int main() {
18+ foo();
19+ return 0;
20+ }
You can’t perform that action at this time.
0 commit comments