1; ModuleID = 'hi.c'
2source_filename = "hi.c"
3target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
4target triple = "wasm32-unknown-unknown"
5
6; // hi.c:
7; extern void foo(int);
8;
9; int test(int t) {
10;   return t * t;
11; }
12;
13; int _start() {
14;   foo(test(10));
15;   return 0;
16; }
17
18; Function Attrs: nounwind readnone
19define hidden i32 @test(i32 %t) local_unnamed_addr #0 !dbg !7 {
20entry:
21  call void @llvm.dbg.value(metadata i32 %t, metadata !12, metadata !DIExpression()), !dbg !13
22  %mul = mul nsw i32 %t, %t, !dbg !14
23  ret i32 %mul, !dbg !15
24}
25
26; Function Attrs: nounwind
27define hidden i32 @_start() local_unnamed_addr #1 !dbg !16 {
28entry:
29  tail call void @foo(i32 100) #4, !dbg !19
30  ret i32 0, !dbg !20
31}
32
33declare void @foo(i32) local_unnamed_addr #2
34
35; Function Attrs: nounwind readnone speculatable
36declare void @llvm.dbg.value(metadata, metadata, metadata) #3
37
38attributes #0 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
39attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
40attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
41attributes #3 = { nounwind readnone speculatable }
42attributes #4 = { nounwind }
43
44!llvm.dbg.cu = !{!0}
45!llvm.module.flags = !{!3, !4, !5}
46!llvm.ident = !{!6}
47
48!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 7.0.0 (trunk 331321)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
49!1 = !DIFile(filename: "hi.c", directory: "/Users/yury/llvmwasm")
50!2 = !{}
51!3 = !{i32 2, !"Dwarf Version", i32 4}
52!4 = !{i32 2, !"Debug Info Version", i32 3}
53!5 = !{i32 1, !"wchar_size", i32 4}
54!6 = !{!"clang version 7.0.0 (trunk 331321)"}
55!7 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !11)
56!8 = !DISubroutineType(types: !9)
57!9 = !{!10, !10}
58!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
59!11 = !{!12}
60!12 = !DILocalVariable(name: "t", arg: 1, scope: !7, file: !1, line: 3, type: !10)
61!13 = !DILocation(line: 3, column: 14, scope: !7)
62!14 = !DILocation(line: 4, column: 12, scope: !7)
63!15 = !DILocation(line: 4, column: 3, scope: !7)
64!16 = distinct !DISubprogram(name: "_start", scope: !1, file: !1, line: 7, type: !17, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !0, retainedNodes: !2)
65!17 = !DISubroutineType(types: !18)
66!18 = !{!10}
67!19 = !DILocation(line: 8, column: 3, scope: !16)
68!20 = !DILocation(line: 9, column: 3, scope: !16)
69