xref: /llvm-project/bolt/test/non-empty-debug-line.test (revision b73c87bc4ffaecbc9c0f54d4ff95659fc13d2d65)
1# Verifies that BOLT emits DWARF line table with the same size if
2# no functions with debug info were modified.
3
4RUN: %clang %S/Inputs/hello.c -g -o %t
5RUN: llvm-bolt %t -o %t1 -update-debug-sections -funcs=_start
6RUN: llvm-readobj -S %t > %t2
7RUN: llvm-readobj -S %t1 >> %t2
8RUN: FileCheck %s --input-file %t2
9
10# Check the input and grab .debug_line size.
11CHECK: File:
12CHECK: Name: .debug_line
13CHECK: Size: [[SIZE:[0-9]+]]
14
15# Verify .debug_line size is the same after BOLT.
16CHECK: File:
17CHECK: Name: .debug_line
18CHECK: Size:
19CHECK-SAME: [[SIZE]]
20