69 lines · plain
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 readnone19define 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 !1322 %mul = mul nsw i32 %t, %t, !dbg !1423 ret i32 %mul, !dbg !1524}25 26; Function Attrs: nounwind27define hidden i32 @_start() local_unnamed_addr #1 !dbg !16 {28entry:29 tail call void @foo(i32 100) #4, !dbg !1930 ret i32 0, !dbg !2031}32 33declare void @foo(i32) local_unnamed_addr #234 35; Function Attrs: nounwind readnone speculatable36declare void @llvm.dbg.value(metadata, metadata, metadata) #337 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" "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" "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" "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