17bccf8d2SMaksim Panchenko## Check that BOLT correctly prints and updates debug info for inlined 27bccf8d2SMaksim Panchenko## functions. 37bccf8d2SMaksim Panchenko 47bccf8d2SMaksim Panchenko# REQUIRES: system-linux 57bccf8d2SMaksim Panchenko 6dcc595eaSVladislav Khmelevsky# RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \ 71d5263c5SAmir Ayupov# RUN: -I%p/../Inputs -o %t.exe -Wl,-q 8*d648aa1bSMaksim Panchenko# RUN: llvm-bolt %t.exe --update-debug-sections --print-debug-info \ 9*d648aa1bSMaksim Panchenko# RUN: --print-only=main --print-after-lowering --force-inline=foo \ 10*d648aa1bSMaksim Panchenko# RUN: -o %t.bolt \ 117bccf8d2SMaksim Panchenko# RUN: | FileCheck %s 127bccf8d2SMaksim Panchenko 137bccf8d2SMaksim Panchenko## The call to puts() should come from inline-foo.c: 14f0f5d19aSMaksim Panchenko# CHECK: callq {{.*}} # debug line {{.*}}inline-foo.c:4:3 157bccf8d2SMaksim Panchenko 167bccf8d2SMaksim Panchenko# RUN: llvm-objdump --disassemble-symbols=main -d --line-numbers %t.bolt \ 177bccf8d2SMaksim Panchenko# RUN: | FileCheck %s -check-prefix=CHECK-OBJDUMP 187bccf8d2SMaksim Panchenko 197bccf8d2SMaksim Panchenko## Dump of main() should include debug info from inline-foo.c after inlining: 207bccf8d2SMaksim Panchenko# CHECK-OBJDUMP: inline-foo.c:4 21