File: debuginfofinder-imported-global-variable.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (41 lines) | stat: -rw-r--r-- 1,614 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
; RUN: opt -passes='print<module-debuginfo>' -disable-output 2>&1 < %s \
; RUN:   | FileCheck %s

; This is to track DebugInfoFinder's ability to find the debug info metadata,
; in particular, properly visit different kinds of DIImportedEntities.

; Derived from the following C++ snippet
;
; namespace s {
;   int i;
; }
;
; using s::i;
;
; compiled with `clang -O1 -g3 -emit-llvm -S`

; CHECK: Compile unit: DW_LANG_C_plus_plus from /somewhere/source.cpp
; CHECK: Global variable: i from /somewhere/source.cpp:2 ('_ZN1s1iE')
; CHECK: Type: int DW_ATE_signed

@_ZN1s1iE = local_unnamed_addr global i32 0, align 4, !dbg !0

!llvm.dbg.cu = !{!5}
!llvm.module.flags = !{!10, !11, !12, !13}
!llvm.ident = !{!14}

!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "i", linkageName: "_ZN1s1iE", scope: !2, file: !3, line: 2, type: !4, isLocal: false, isDefinition: true)
!2 = !DINamespace(name: "s", scope: null)
!3 = !DIFile(filename: "source.cpp", directory: "/somewhere")
!4 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 7.0.99", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, globals: !7, imports: !8)
!6 = !{}
!7 = !{!0}
!8 = !{!9}
!9 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !1, file: !3, line: 5)
!10 = !{i32 2, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{i32 1, !"wchar_size", i32 4}
!13 = !{i32 7, !"PIC Level", i32 2}
!14 = !{!"clang version 7.0.99"}