brintos

brintos / llvm-project-archived public Read only

0
0
Text · 482 B · 2e5e13f Raw
20 lines · plain
1; RUN: not llvm-as < %s > /dev/null 2>&12 3	%list = type { i32, ptr }4 5; This usage is invalid now; instead, objects must be bitcast to ptr for input6; to the gc intrinsics.7declare void @llvm.gcwrite(ptr, ptr, ptr)8 9define ptr @cons(i32 %hd, ptr %tl) gc "example" {10	%tmp = call ptr @gcalloc(i32 bitcast(ptr getelementptr(%list, ptr null, i32 1) to i32))11	12	store i32 %hd, ptr %tmp13	14	call void @llvm.gcwrite(ptr %tl, ptr %tmp, ptr %tmp)15	16	ret %cell.217}18 19declare ptr @gcalloc(i32)20