diff options
author | Philip Reames <listmail@philipreames.com> | 2015-03-27 05:09:33 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2015-03-27 05:09:33 +0000 |
commit | e1bf27045de74e279a003a9d0d1a322c953a71d6 (patch) | |
tree | 8a5313c59874090509ff46627e0a5f5969fba692 /llvm/lib/IR/Verifier.cpp | |
parent | f8f0933b488bcbd1cc4b69a93bb18f8c33ce6847 (diff) | |
download | bcm5719-llvm-e1bf27045de74e279a003a9d0d1a322c953a71d6.tar.gz bcm5719-llvm-e1bf27045de74e279a003a9d0d1a322c953a71d6.zip |
Require a GC strategy be specified for functions which use gc.statepoint
This was discussed a while back and I left it optional for migration. Since it's been far more than the 'week or two' that was discussed, time to actually make this manditory.
llvm-svn: 233357
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 248d1279eaf..bba24c39221 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2926,6 +2926,8 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { case Intrinsic::experimental_gc_statepoint: Assert(!CI.isInlineAsm(), "gc.statepoint support for inline assembly unimplemented", &CI); + Assert(CI.getParent()->getParent()->hasGC(), + "Enclosing function does not use GC.", &CI); VerifyStatepoint(ImmutableCallSite(&CI)); break; @@ -2933,6 +2935,8 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { case Intrinsic::experimental_gc_result_float: case Intrinsic::experimental_gc_result_ptr: case Intrinsic::experimental_gc_result: { + Assert(CI.getParent()->getParent()->hasGC(), + "Enclosing function does not use GC.", &CI); // Are we tied to a statepoint properly? CallSite StatepointCS(CI.getArgOperand(0)); const Function *StatepointFn = |