From: Bill Wendling Date: Tue, 18 Nov 2008 23:09:31 +0000 (+0000) Subject: Verify that the second parameter of the stacprotector intrinsic is an alloca X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5b795e8ce28076aeb64ac4342b725bceac3607e;p=oota-llvm.git Verify that the second parameter of the stacprotector intrinsic is an alloca instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59563 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index a699ab2af20..86413ed6202 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1374,6 +1374,11 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { "invalid arguments to llvm.prefetch", &CI); break; + case Intrinsic::stackprotector: + Assert1(isa(CI.getOperand(2)), + "llvm.stackprotector parameter #2 must resolve to an alloca.", + &CI); + break; } }