Home | History | Annotate | Download | only in COFF
      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'
     14 source_filename = "t.ii"
     15 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
     16 target triple = "x86_64-pc-windows-msvc19.0.0"
     17 
     18 @x = global i32 42
     19 
     20 !llvm.dbg.cu = !{!0}
     21 !llvm.module.flags = !{!35, !36, !37}
     22 !llvm.ident = !{!38}
     23 
     24 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 272215) (llvm/trunk 272226)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3)
     25 !1 = !DIFile(filename: "t.c", directory: "foo")
     26 !2 = !{}
     27 !3 = !{!4, !6}
     28 !4 = distinct !DIGlobalVariable(name: "_OptionsStorage", scope: !0, file: !1, line: 3, type: !5, isLocal: true, isDefinition: true)
     29 !5 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
     30 !6 = distinct !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 4, type: !5, isLocal: true, isDefinition: true, variable: i32* @x)
     31 
     32 !35 = !{i32 2, !"CodeView", i32 1}
     33 !36 = !{i32 2, !"Debug Info Version", i32 3}
     34 !37 = !{i32 1, !"PIC Level", i32 2}
     35 !38 = !{!"clang version 3.9.0 (trunk 272215) (llvm/trunk 272226)"}
     36