Skip to content

Instantly share code, notes, and snippets.

@nikic

nikic/repro.ll Secret

Last active January 17, 2022 11:50
Show Gist options
  • Save nikic/b6c45e5eeac03ef1fd842353815ceba4 to your computer and use it in GitHub Desktop.
Save nikic/b6c45e5eeac03ef1fd842353815ceba4 to your computer and use it in GitHub Desktop.
define void @test() {
tail call void @set_state()
call void @llvm.dbg.value(metadata i64 0, metadata !12, metadata !DIExpression()), !dbg !27
ret void
}
declare void @set_state()
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.value(metadata, metadata, metadata) #0
attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
!llvm.module.flags = !{!0}
!llvm.dbg.cu = !{!1}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !2, producer: "clang LLVM (rustc version 1.60.0-nightly (ec4bcaac4 2022-01-15))", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3)
!2 = !DIFile(filename: "src/lib.rs/@/bug.63e521cd-cgu.0", directory: "/tmp/rust-bug")
!3 = !{!4}
!4 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "Option", scope: !6, file: !5, baseType: !8, size: 8, align: 8, flags: DIFlagEnumClass, elements: !9)
!5 = !DIFile(filename: "<unknown>", directory: "")
!6 = !DINamespace(name: "option", scope: !7)
!7 = !DINamespace(name: "core", scope: null)
!8 = !DIBasicType(name: "u8", size: 8, encoding: DW_ATE_unsigned)
!9 = !{!10, !11}
!10 = !DIEnumerator(name: "None", value: 0)
!11 = !DIEnumerator(name: "Some", value: 1)
!12 = !DILocalVariable(name: "msg", arg: 2, scope: !13, file: !14, line: 689, type: !17)
!13 = distinct !DISubprogram(name: "expect<()>", linkageName: "_ZN4core6option15Option$LT$T$GT$6expect17h9a574c18f194c213E", scope: !4, file: !14, line: 689, type: !15, scopeLine: 689, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !24, retainedNodes: !23)
!14 = !DIFile(filename: "/rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/core/src/option.rs", directory: "", checksumkind: CSK_MD5, checksum: "4120c8557937a0772190a676ec193800")
!15 = !DISubroutineType(types: !16)
!16 = !{null, !4, !17}
!17 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !5, size: 128, align: 64, elements: !18, templateParams: !23, identifier: "84eec819988617519061e0b609a72fe3")
!18 = !{!19, !21}
!19 = !DIDerivedType(tag: DW_TAG_member, name: "data_ptr", scope: !17, file: !5, baseType: !20, size: 64, align: 64)
!20 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "*const u8", baseType: !8, size: 64, align: 64, dwarfAddressSpace: 0)
!21 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !17, file: !5, baseType: !22, size: 64, align: 64, offset: 64)
!22 = !DIBasicType(name: "usize", size: 64, encoding: DW_ATE_unsigned)
!23 = !{}
!24 = !{!25}
!25 = !DITemplateTypeParameter(name: "T", type: !26)
!26 = !DIBasicType(name: "()", encoding: DW_ATE_unsigned)
!27 = !DILocation(line: 0, scope: !13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment