1target triple = "wasm32-unknown-unknown" 2 3$foo = comdat any 4 5@constantData = constant [3 x i8] c"abc", comdat($foo) 6 7define i32 @comdatFn() comdat($foo) { 8 ret i32 ptrtoint ([3 x i8]* @constantData to i32) 9} 10 11define internal void @do_init() comdat($foo) { 12 ret void 13} 14 15%0 = type { i32, void ()*, i8* } 16@llvm.global_ctors = appending global [1 x %0 ] [%0 { i32 65535, void ()* @do_init, i8* null }] 17 18; Everything above this is part of the `foo` comdat group 19 20define i32 @callComdatFn1() { 21 ret i32 ptrtoint (i32 ()* @comdatFn to i32) 22} 23