14a4045f7SElvina Yakubova# Verify that we update DW_TAG_compile_unit' ranges and .debug_aranges 24a4045f7SElvina Yakubova# for assembly function that doesn't have corresponding DIE. 34a4045f7SElvina Yakubova# 44a4045f7SElvina Yakubova# The input test case foo() contains nops that we remove. 54a4045f7SElvina Yakubova 64ff1bc2fSAlexander YermolovichRUN: %clang %cflags -gdwarf-5 -no-pie %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe 7d648aa1bSMaksim PanchenkoRUN: llvm-bolt %t.exe -o %t --update-debug-sections 84a4045f7SElvina YakubovaRUN: llvm-dwarfdump -all %t | FileCheck %s 94a4045f7SElvina Yakubova 104a4045f7SElvina Yakubova# Check ranges were created/updated for asm compile unit 114ff1bc2fSAlexander YermolovichCHECK: 0x0000000c: DW_TAG_compile_unit 124a4045f7SElvina YakubovaCHECK-NEXT: DW_AT_stmt_list (0x00000000) 134a4045f7SElvina YakubovaCHECK-NEXT: DW_AT_low_pc (0x0000000000000000) 144a4045f7SElvina YakubovaCHECK-NEXT: DW_AT_ranges 154a4045f7SElvina YakubovaCHECK-NEXT: [0x0000000000[[#%x,ADDR:]], 164a4045f7SElvina YakubovaCHECK-SAME: 0x0000000000[[#ADDR+4]])) 1742a66fb7SRafael AulerCHECK-NEXT: DW_AT_name ("{{.*}}asm_foo.s") 184a4045f7SElvina Yakubova 194a4045f7SElvina Yakubova# Check .debug_aranges was updated for asm module 204a4045f7SElvina YakubovaCHECK: .debug_aranges contents: 214a4045f7SElvina YakubovaCHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 224a4045f7SElvina YakubovaCHECK-NEXT: [0x0000000000[[#ADDR]], 0x0000000000[[#ADDR+4]]) 234a4045f7SElvina Yakubova 244a4045f7SElvina Yakubova# Check line number info was updated 25*6aa94c64SDavid StenbergCHECK: 0x0000000000[[#ADDR]] 13 0 0 0 0 0 is_stmt 26*6aa94c64SDavid StenbergCHECK-NEXT: 0x0000000000[[#ADDR+4]] 13 0 0 0 0 0 is_stmt end_sequence 27