• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s | FileCheck %s
2
3; This tests that we don't emit information about globals that were discarded
4; during optimization. We should only see one global symbol record.
5
6; CHECK: .short  4364                    # Record kind: S_LDATA32
7; CHECK: .long   117                     # Type
8; CHECK: .secrel32       x               # DataOffset
9; CHECK: .secidx x                       # Segment
10; CHECK: .asciz  "x"                     # Name
11; CHECK-NOT: S_GDATA32
12
13; ModuleID = 't.ii'
14source_filename = "t.ii"
15target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
16target triple = "x86_64-pc-windows-msvc19.0.0"
17
18@x = global i32 42, !dbg !0
19
20!llvm.dbg.cu = !{!2}
21!llvm.module.flags = !{!9, !10, !11}
22!llvm.ident = !{!12}
23
24!0 = distinct !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
25!1 = !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 4, type: !8, isLocal: true, isDefinition: true)
26!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 272215) (llvm/trunk 272226)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5)
27!3 = !DIFile(filename: "t.c", directory: "foo")
28!4 = !{}
29!5 = !{!6, !0}
30!6 = distinct !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
31!7 = !DIGlobalVariable(name: "_OptionsStorage", scope: !2, file: !3, line: 3, type: !8, isLocal: true, isDefinition: true)
32!8 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
33!9 = !{i32 2, !"CodeView", i32 1}
34!10 = !{i32 2, !"Debug Info Version", i32 3}
35!11 = !{i32 1, !"PIC Level", i32 2}
36!12 = !{!"clang version 3.9.0 (trunk 272215) (llvm/trunk 272226)"}
37
38