1; RUN: llc -emit-call-site-info -O3 -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-linux-gnu" 5 6; Verify that we produce call site entries for the zero-valued parameters. 7; 8; Based on the following reproducer: 9; 10; #include <stdint.h> 11; extern void callee(uint8_t, uint16_t, uint32_t, void *); 12; int caller() { 13; callee(0, 0, 0, (void *)0); 14; return 1; 15; } 16 17; CHECK: DW_TAG_GNU_call_site_parameter 18; CHECK-NEXT: DW_AT_location (DW_OP_reg2 RCX) 19; CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_lit0) 20 21; CHECK: DW_TAG_GNU_call_site_parameter 22; CHECK-NEXT: DW_AT_location (DW_OP_reg1 RDX) 23; CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_lit0) 24 25; CHECK: DW_TAG_GNU_call_site_parameter 26; CHECK-NEXT: DW_AT_location (DW_OP_reg4 RSI) 27; CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_lit0) 28 29; CHECK: DW_TAG_GNU_call_site_parameter 30; CHECK-NEXT: DW_AT_location (DW_OP_reg5 RDI) 31; CHECK-NEXT: DW_AT_GNU_call_site_value (DW_OP_lit0) 32 33; Function Attrs: nounwind uwtable 34define i32 @caller() #0 !dbg !15 { 35entry: 36 tail call void @callee(i8 zeroext 0, i16 zeroext 0, i32 0, i8* null), !dbg !19 37 ret i32 1, !dbg !20 38} 39 40declare !dbg !5 void @callee(i8 zeroext, i16 zeroext, i32, i8*) 41 42attributes #0 = { nounwind uwtable } 43 44!llvm.dbg.cu = !{!0} 45!llvm.module.flags = !{!11, !12, !13} 46!llvm.ident = !{!14} 47 48!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None) 49!1 = !DIFile(filename: "zero.c", directory: "/") 50!2 = !{} 51!3 = !{!4, !5} 52!4 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) 53!5 = !DISubprogram(name: "callee", scope: !1, file: !1, line: 2, type: !6, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) 54!6 = !DISubroutineType(types: !7) 55!7 = !{null, !8, !9, !10, !4} 56!8 = !DIBasicType(name: "unsigned char", size: 8, encoding: DW_ATE_unsigned_char) 57!9 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned) 58!10 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) 59!11 = !{i32 2, !"Dwarf Version", i32 4} 60!12 = !{i32 2, !"Debug Info Version", i32 3} 61!13 = !{i32 1, !"wchar_size", i32 4} 62!14 = !{!"clang version 10.0.0"} 63!15 = distinct !DISubprogram(name: "caller", scope: !1, file: !1, line: 3, type: !16, scopeLine: 3, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2) 64!16 = !DISubroutineType(types: !17) 65!17 = !{!18} 66!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 67!19 = !DILocation(line: 4, scope: !15) 68!20 = !DILocation(line: 5, scope: !15) 69