diff options
| author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-09-17 20:30:04 +0000 |
|---|---|---|
| committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-09-17 20:30:04 +0000 |
| commit | a2f3e13cf4d4ea03da017caadb60e9965eaa21dc (patch) | |
| tree | be3363d2fb0a483067c68c05c39dfc232fafd2a6 /llvm/test/Verifier/gcroot-ptrptr.ll | |
| parent | 486760aee3cd6b74617924feb7a360278cd2b1a3 (diff) | |
| download | bcm5719-llvm-a2f3e13cf4d4ea03da017caadb60e9965eaa21dc.tar.gz bcm5719-llvm-a2f3e13cf4d4ea03da017caadb60e9965eaa21dc.zip | |
Fix for PR1633: Verifier doesn't fully verify GC intrinsics
LLVM now enforces the following prototypes for the write barriers:
<ty>* @llvm.gcread(<ty2>*, <ty>**)
void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**)
And for @llvm.gcroot, the first stack slot is verified to be an alloca or a
bitcast of an alloca.
Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these.
llvm-svn: 42051
Diffstat (limited to 'llvm/test/Verifier/gcroot-ptrptr.ll')
| -rw-r--r-- | llvm/test/Verifier/gcroot-ptrptr.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Verifier/gcroot-ptrptr.ll b/llvm/test/Verifier/gcroot-ptrptr.ll new file mode 100644 index 00000000000..0a7738d866c --- /dev/null +++ b/llvm/test/Verifier/gcroot-ptrptr.ll @@ -0,0 +1,14 @@ +; RUN: not llvm-as < %s +; PR1633 + +%meta = type { i8* } +%obj = type { %meta* } + +declare void @llvm.gcroot(%obj*, %meta*) + +define void @f() { +entry: + %local.obj = alloca %obj + call void @llvm.gcroot(%obj* %local.obj, %meta* null) + ret void +} |

