llvm-project/bolt/test/X86/inline-debug-info.test
Amir Ayupov 1d5263c554 [BOLT][TEST] Fix test failures on AArch64 builder
Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:
```
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
```

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D124863
2022-05-03 15:39:43 -07:00

20 lines
754 B
Plaintext

## Check that BOLT correctly prints and updates debug info for inlined
## functions.
# REQUIRES: system-linux
# RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \
# RUN: -I%p/../Inputs -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe -update-debug-sections -print-debug-info \
# RUN: -print-only=main -print-after-lowering -force-inline=foo -o %t.bolt \
# RUN: | FileCheck %s
## The call to puts() should come from inline-foo.c:
# CHECK: callq {{.*}} # debug line {{.*}}inline-foo.c:4:3
# RUN: llvm-objdump --disassemble-symbols=main -d --line-numbers %t.bolt \
# RUN: | FileCheck %s -check-prefix=CHECK-OBJDUMP
## Dump of main() should include debug info from inline-foo.c after inlining:
# CHECK-OBJDUMP: inline-foo.c:4