diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-08-23 09:46:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-08-23 09:46:46 +0000 |
commit | 955fdeb19c35a238674d8c06f5f144f3103d73c9 (patch) | |
tree | 7f2273f2a2ad550a5ff830a0532cfd2b661bd644 /lib/VMCore/Verifier.cpp | |
parent | 3793325cb3b4d97a295e5aaa419cfcf2866940c9 (diff) | |
download | external_llvm-955fdeb19c35a238674d8c06f5f144f3103d73c9.zip external_llvm-955fdeb19c35a238674d8c06f5f144f3103d73c9.tar.gz external_llvm-955fdeb19c35a238674d8c06f5f144f3103d73c9.tar.bz2 |
Reverting r55227. This was causing the following failures in the regression
tests:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcread-ptrptr.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-alloca.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-meta.ll >& /dev/null
child process exited abnormally
FAIL: ndbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcroot-ptrptr.ll >& /dev/null
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll for PR1633
Failed with exit(1) at line 1
while running: not llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.HEAD.src/test/Verifier/gcwrite-ptrptr.ll >& /dev/null
child process exited abnormally
=== Summary ===
# of expected passes 3021
# of unexpected failures 6
# of expected failures 16
make[1]: *** [check-local] Error 1
make: *** [check] Error 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index e569011..fc458c8 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1283,6 +1283,45 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { "alignment argument of memory intrinsics must be a constant int", &CI); break; + case Intrinsic::gcroot: + case Intrinsic::gcwrite: + case Intrinsic::gcread: { + Type *PtrTy = PointerType::getUnqual(Type::Int8Ty), + *PtrPtrTy = PointerType::getUnqual(PtrTy); + + switch (ID) { + default: + break; + case Intrinsic::gcroot: + Assert1(CI.getOperand(1)->getType() == PtrPtrTy, + "Intrinsic parameter #1 is not i8**.", &CI); + Assert1(CI.getOperand(2)->getType() == PtrTy, + "Intrinsic parameter #2 is not i8*.", &CI); + Assert1(isa<AllocaInst>(CI.getOperand(1)->stripPointerCasts()), + "llvm.gcroot parameter #1 must be an alloca.", &CI); + Assert1(isa<Constant>(CI.getOperand(2)), + "llvm.gcroot parameter #2 must be a constant.", &CI); + break; + case Intrinsic::gcwrite: + Assert1(CI.getOperand(1)->getType() == PtrTy, + "Intrinsic parameter #1 is not a i8*.", &CI); + Assert1(CI.getOperand(2)->getType() == PtrTy, + "Intrinsic parameter #2 is not a i8*.", &CI); + Assert1(CI.getOperand(3)->getType() == PtrPtrTy, + "Intrinsic parameter #3 is not a i8**.", &CI); + break; + case Intrinsic::gcread: + Assert1(CI.getOperand(1)->getType() == PtrTy, + "Intrinsic parameter #1 is not a i8*.", &CI); + Assert1(CI.getOperand(2)->getType() == PtrPtrTy, + "Intrinsic parameter #2 is not a i8**.", &CI); + break; + } + + Assert1(CI.getParent()->getParent()->hasGC(), + "Enclosing function does not use GC.", + &CI); + } break; case Intrinsic::init_trampoline: Assert1(isa<Function>(CI.getOperand(2)->stripPointerCasts()), "llvm.init_trampoline parameter #2 must resolve to a function.", |