github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/compiler/testdata/pragma.ll (about) 1 ; ModuleID = 'pragma.go' 2 source_filename = "pragma.go" 3 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20" 4 target triple = "wasm32-unknown-wasi" 5 6 @extern_global = external global [0 x i8], align 1 7 @main.alignedGlobal = hidden global [4 x i32] zeroinitializer, align 32 8 @main.alignedGlobal16 = hidden global [4 x i32] zeroinitializer, align 16 9 @llvm.used = appending global [3 x ptr] [ptr @extern_func, ptr @exportedFunctionInSection, ptr @exported] 10 @main.globalInSection = hidden global i32 0, section ".special_global_section", align 4 11 @undefinedGlobalNotInSection = external global i32, align 4 12 @main.multipleGlobalPragmas = hidden global i32 0, section ".global_section", align 1024 13 14 ; Function Attrs: allockind("alloc,zeroed") allocsize(0) 15 declare noalias nonnull ptr @runtime.alloc(i32, ptr, ptr) #0 16 17 declare void @runtime.trackPointer(ptr nocapture readonly, ptr, ptr) #1 18 19 ; Function Attrs: nounwind 20 define hidden void @main.init(ptr %context) unnamed_addr #2 { 21 entry: 22 ret void 23 } 24 25 ; Function Attrs: nounwind 26 define void @extern_func() #3 { 27 entry: 28 ret void 29 } 30 31 ; Function Attrs: nounwind 32 define hidden void @somepkg.someFunction1(ptr %context) unnamed_addr #2 { 33 entry: 34 ret void 35 } 36 37 declare void @somepkg.someFunction2(ptr) #1 38 39 ; Function Attrs: inlinehint nounwind 40 define hidden void @main.inlineFunc(ptr %context) unnamed_addr #4 { 41 entry: 42 ret void 43 } 44 45 ; Function Attrs: noinline nounwind 46 define hidden void @main.noinlineFunc(ptr %context) unnamed_addr #5 { 47 entry: 48 ret void 49 } 50 51 ; Function Attrs: noinline nounwind 52 define hidden void @main.functionInSection(ptr %context) unnamed_addr #5 section ".special_function_section" { 53 entry: 54 ret void 55 } 56 57 ; Function Attrs: noinline nounwind 58 define void @exportedFunctionInSection() #6 section ".special_function_section" { 59 entry: 60 ret void 61 } 62 63 declare void @main.declaredImport() #7 64 65 declare void @imported() #8 66 67 ; Function Attrs: nounwind 68 define void @exported() #9 { 69 entry: 70 ret void 71 } 72 73 declare void @main.undefinedFunctionNotInSection(ptr) #1 74 75 attributes #0 = { allockind("alloc,zeroed") allocsize(0) "alloc-family"="runtime.alloc" "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" } 76 attributes #1 = { "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" } 77 attributes #2 = { nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" } 78 attributes #3 = { nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" "wasm-export-name"="extern_func" } 79 attributes #4 = { inlinehint nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" } 80 attributes #5 = { noinline nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" } 81 attributes #6 = { noinline nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" "wasm-export-name"="exportedFunctionInSection" } 82 attributes #7 = { "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" "wasm-import-module"="modulename" "wasm-import-name"="import1" } 83 attributes #8 = { "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" "wasm-import-module"="foobar" "wasm-import-name"="imported" } 84 attributes #9 = { nounwind "target-features"="+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext" "wasm-export-name"="exported" }