Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / DebugInfo / COFF / types-empty-member-fn.ll
blob87cba9d62099e8710e6d9adf8d0d4d028739ce53
1 ; RUN: llc < %s -filetype=obj | llvm-readobj - -codeview | FileCheck %s
3 ; ModuleID = 'foo.3a1fbbbh-cgu.0'
4 source_filename = "foo.3a1fbbbh-cgu.0"
5 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-pc-windows-msvc"
8 ; Rust source to regenerate:
9 ; $ cat foo.rs
10 ; pub struct Foo;
11 ; impl Foo {
12 ;     pub fn foo() {}
13 ; }
14 ; $ rustc foo.rs --crate-type lib -Cdebuginfo=1 --emit=llvm-ir
16 ; CHECK:      CodeViewTypes [
17 ; CHECK:        MemberFunction (0x1006) {
18 ; CHECK-NEXT:     TypeLeafKind: LF_MFUNCTION (0x1009)
19 ; CHECK-NEXT:     ReturnType: void (0x3)
20 ; CHECK-NEXT:     ClassType: foo::Foo (0x1000)
21 ; CHECK-NEXT:     ThisType: 0x0
22 ; CHECK-NEXT:     CallingConvention: NearC (0x0)
23 ; CHECK-NEXT:     FunctionOptions [ (0x0)
24 ; CHECK-NEXT:     ]
25 ; CHECK-NEXT:     NumParameters: 0
26 ; CHECK-NEXT:     ArgListType: () (0x1005)
27 ; CHECK-NEXT:     ThisAdjustment: 0
28 ; CHECK-NEXT:   }
29 ; CHECK-NEXT:   MemberFuncId (0x1007) {
30 ; CHECK-NEXT:     TypeLeafKind: LF_MFUNC_ID (0x1602)
31 ; CHECK-NEXT:     ClassType: foo::Foo (0x1000)
32 ; CHECK-NEXT:     FunctionType: void foo::Foo::() (0x1006)
33 ; CHECK-NEXT:     Name: foo
34 ; CHECK-NEXT:   }
35 ; CHECK:      CodeViewDebugInfo [
36 ; CHECK:        FunctionLineTable [
37 ; CHECK-NEXT:     LinkageName: _ZN3foo3Foo3foo17hc557c2121772885bE
38 ; CHECK-NEXT:     Flags: 0x0
39 ; CHECK-NEXT:     CodeSize: 0x1
40 ; CHECK-NEXT:     FilenameSegment [
41 ; CHECK-NEXT:       Filename: D:\rust\foo.rs (0x0)
42 ; CHECK-NEXT:       +0x0 [
43 ; CHECK-NEXT:         LineNumberStart: 3
44 ; CHECK-NEXT:         LineNumberEndDelta: 0
45 ; CHECK-NEXT:         IsStatement: No
46 ; CHECK-NEXT:       ]
47 ; CHECK-NEXT:     ]
48 ; CHECK-NEXT:   ]
50 ; foo::Foo::foo
51 ; Function Attrs: uwtable
52 define void @_ZN3foo3Foo3foo17hc557c2121772885bE() unnamed_addr #0 !dbg !5 {
53 start:
54   ret void, !dbg !10
57 attributes #0 = { uwtable "target-cpu"="x86-64" }
59 !llvm.dbg.cu = !{!0}
60 !llvm.module.flags = !{!3, !4}
62 !0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "clang LLVM (rustc version 1.33.0-nightly (8b0f0156e 2019-01-22))", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
63 !1 = !DIFile(filename: "foo.rs", directory: "D:\5Crust")
64 !2 = !{}
65 !3 = !{i32 2, !"CodeView", i32 1}
66 !4 = !{i32 2, !"Debug Info Version", i32 3}
67 !5 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3foo3Foo3foo17hc557c2121772885bE", scope: !6, file: !1, line: 3, type: !9, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, templateParams: !2, retainedNodes: !2)
68 !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", scope: !8, file: !7, align: 8, elements: !2, templateParams: !2, identifier: "5105d9fe1a2a3c68518268151b672274")
69 !7 = !DIFile(filename: "<unknown>", directory: "")
70 !8 = !DINamespace(name: "foo", scope: null)
71 !9 = !DISubroutineType(types: !2)
72 !10 = !DILocation(line: 3, scope: !5)