llvm-6502/test/CodeGen/Generic/GC/lower_gcroot.ll
Gordon Henriksen e1433f24cf Noting and enforcing that GC intrinsics are valid only within a
function with GC.

This will catch the error when the inliner inlines a function with
GC into a caller with no GC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45350 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 02:31:26 +00:00

12 lines
216 B
LLVM

; RUN: llvm-as < %s | llc
%Env = type i8*
define void @.main(%Env) gc "shadow-stack" {
%Root = alloca %Env
call void @llvm.gcroot( %Env* %Root, %Env null )
unreachable
}
declare void @llvm.gcroot(%Env*, %Env)