42 lines · plain
1; RUN: llc -o - %s -filetype=obj -frame-pointer=all | llvm-dwarfdump - | FileCheck %s2 3target triple="aarch64--"4 5define void @f() sanitize_hwaddress !dbg !6 {6entry:7 %x = call ptr @g(i32 0)8 %a = alloca [128 x i8]9 %b = alloca [128 x i8]10 ; CHECK: DW_AT_location (DW_OP_fbreg11 call void @llvm.dbg.declare(metadata ptr %a, metadata !12, metadata !DIExpression()), !dbg !1412 ; CHECK: DW_AT_location (DW_OP_fbreg13 call void @llvm.dbg.declare(metadata ptr %b, metadata !13, metadata !DIExpression()), !dbg !1414 ret void, !dbg !1515}16 17declare ptr @g(i32)18 19declare void @llvm.dbg.declare(metadata, metadata, metadata)20 21!llvm.dbg.cu = !{!0}22!llvm.module.flags = !{!3, !4}23!llvm.ident = !{!5}24 25!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)26!1 = !DIFile(filename: "x.c", directory: "/")27!2 = !{}28!3 = !{i32 2, !"Dwarf Version", i32 4}29!4 = !{i32 2, !"Debug Info Version", i32 3}30!5 = !{!"clang"}31!6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags:32DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)33!7 = !DISubroutineType(types: !8)34!8 = !{null, !9}35!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64)36!10 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !11)37!11 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)38!12 = !DILocalVariable(name: "a", scope: !6, file: !1, line: 1, type: !9)39!13 = !DILocalVariable(name: "b", scope: !6, file: !1, line: 1, type: !9)40!14 = !DILocation(line: 1, column: 29, scope: !6)41!15 = !DILocation(line: 1, column: 37, scope: !6)42