Skip to content

Instantly share code, notes, and snippets.

@jmorse
Created February 12, 2024 16:48
Show Gist options
  • Save jmorse/17040c19a096dd3780274f8e58d97b16 to your computer and use it in GitHub Desktop.
Save jmorse/17040c19a096dd3780274f8e58d97b16 to your computer and use it in GitHub Desktop.
; ModuleID = 'b.ll'
source_filename = "b.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-unknown"
define void @derefmangled() {
entry:
tail call void @llvm.dbg.value(metadata ptr null, metadata !4, metadata !DIExpression()), !dbg !16
ret void
}
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare void @llvm.dbg.value(metadata, metadata, metadata) #0
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_17, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)
!1 = !DIFile(filename: "foo.cpp", directory: ".")
!2 = !{}
!3 = !{i32 2, !"Debug Info Version", i32 3}
!4 = !DILocalVariable(name: "this", arg: 1, scope: !5, type: !14, flags: DIFlagArtificial | DIFlagObjectPointer)
!5 = distinct !DISubprogram(name: "deref", linkageName: "derefmangled", scope: !7, file: !6, line: 111, type: !9, scopeLine: 112, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !11, retainedNodes: !12)
!6 = !DIFile(filename: "baz.cpp", directory: "")
!7 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "counter", scope: !8, file: !6, line: 109, size: 32, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, templateParams: !2, identifier: "countermangled")
!8 = !DINamespace(name: "barn", scope: null)
!9 = distinct !DISubroutineType(types: !10)
!10 = !{null}
!11 = !DISubprogram(name: "deref", linkageName: "derefmangled", scope: !7, file: !6, line: 111, type: !9, scopeLine: 111, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
!12 = !{!13}
!13 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !5, file: !6, line: 116, size: 64, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !2, identifier: "handle")
!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !15, size: 64)
!15 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7)
!16 = !DILocation(line: 0, scope: !5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment