11## Test that BOLT correctly handles debug line information for functions
22## that belong to multiple compilation units (e.g., inline functions in
33## common header files). The test covers two scenarios:
4- ## 1. Normal processing: .debug_line section shows lines for the function
4+ ## 1. Normal processing: .debug_line section shows lines for the function
55## in all CUs where it was compiled, with no duplicate rows within CUs
6- ## 2. Functions not processed: When BOLT doesn't process functions (using
6+ ## 2. Functions not processed: When BOLT doesn't process functions (using
77## --funcs with nonexistent function), original debug info is preserved
88
99# REQUIRES: system-linux
1010
1111## Compile test files with debug info
12- # RUN: %clang %cflags -O0 -g %S/../ Inputs/multi-cu-file1.c %S/.. /Inputs/multi-cu-file2.c \
13- # RUN: -I%S/../ Inputs -o %t.exe -Wl,-q
12+ # RUN: %clang %cflags -O0 -g %S/Inputs/multi-cu-file1.c %S/Inputs/multi-cu-file2.c \
13+ # RUN: -I%S/Inputs -o %t.exe -Wl,-q
1414
1515## Test 1: Normal BOLT processing (functions are processed/optimized)
1616# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
2626# BASIC: name: "{{.*}}multi-cu-file2.c"
2727
2828## Use our helper script to create a normalized table without addresses
29- # RUN: %S/../Inputs/ process-debug-line.sh %t.debug-line.txt > %t.normalized-debug-line.txt
29+ # RUN: process-debug-line %t.debug-line.txt > %t.normalized-debug-line.txt
3030# RUN: FileCheck %s --check-prefix=NORMALIZED --input-file %t.normalized-debug-line.txt
3131
3232## Check that we have line entries for the inline function (lines 5, 6, 7) from multi-cu-common.h
7272# PRESERVED-BASIC: name: "{{.*}}multi-cu-file2.c"
7373
7474## Create normalized output for the not-emitted case
75- # RUN: %S/../Inputs/ process-debug-line.sh %t.not-emitted.debug-line.txt > %t.not-emitted.normalized.txt
75+ # RUN: process-debug-line %t.not-emitted.debug-line.txt > %t.not-emitted.normalized.txt
7676# RUN: FileCheck %s --check-prefix=PRESERVED-NORMALIZED --input-file %t.not-emitted.normalized.txt
7777
7878## Check that we have line entries for the inline function (lines 5, 6, 7) from multi-cu-common.h
105105# PRESERVED-FILE2: multi-cu-file2.c {{[0-9]+}} {{[0-9]+}} multi-cu-file2.c
106106
107107## Note: We do not check for duplicates in Test 2 since we are preserving original debug info as-is
108- ## and the original may contain patterns that would be flagged as duplicates by our normalization
108+ ## and the original may contain patterns that would be flagged as duplicates by our normalization
0 commit comments