brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · f797046 Raw
48 lines · plain
1; RUN: llc -split-dwarf-file=foo.dwo -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - \2; RUN:   | llvm-dwarfdump - | FileCheck --check-prefix=H1 %s3; RUN: llc -split-dwarf-file=foo.dwo -O0 < %p/../Inputs/fission-hash-local2.ll -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - \4; RUN:   | llvm-dwarfdump - | FileCheck --check-prefix=H2 %s5 6; Testing that the location of a local variable in a global function is hashed7; fission-hash-local2.ll is identical except for the value of the local8; variable (local.ll uses the constant 7 in the llvm.dbg.value below, local2.ll9; uses the constant 9) so it should have a different dwo_id, seen below.10 11; Original source:12; void f1() {13;   int i = 7; // or 914; }15 16; H1: DW_AT_GNU_dwo_id  (0xb06b36aa6004befe)17; H2: DW_AT_GNU_dwo_id  (0xc3e980cf3dfa79a2)18 19; Function Attrs: norecurse nounwind readnone uwtable20define dso_local void @_Z2f1v() local_unnamed_addr !dbg !7 {21entry:22  call void @llvm.dbg.value(metadata i32 7, metadata !11, metadata !DIExpression()), !dbg !1323  ret void, !dbg !1424}25 26; Function Attrs: nounwind readnone speculatable willreturn27declare void @llvm.dbg.value(metadata, metadata, metadata)28 29!llvm.dbg.cu = !{!0}30!llvm.module.flags = !{!3, !4, !5}31!llvm.ident = !{!6}32 33!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0 (git@github.com:llvm/llvm-project.git edc3f4f02e54c2ae1067f60f6a0ed6caf5b92ef6)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)34!1 = !DIFile(filename: "hash.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")35!2 = !{}36!3 = !{i32 7, !"Dwarf Version", i32 4}37!4 = !{i32 2, !"Debug Info Version", i32 3}38!5 = !{i32 1, !"wchar_size", i32 4}39!6 = !{!"clang version 11.0.0 (git@github.com:llvm/llvm-project.git edc3f4f02e54c2ae1067f60f6a0ed6caf5b92ef6)"}40!7 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !10)41!8 = !DISubroutineType(types: !9)42!9 = !{null}43!10 = !{!11}44!11 = !DILocalVariable(name: "i", scope: !7, file: !1, line: 2, type: !12)45!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)46!13 = !DILocation(line: 0, scope: !7)47!14 = !DILocation(line: 3, column: 1, scope: !7)48