From d8e312d11f46adbed805ba233a808d719cbb5e2b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 18 Nov 2008 23:09:31 +0000 Subject: [PATCH] Verify that the second parameter of the stacprotector intrinsic is an alloca instruction. llvm-svn: 59563 --- llvm/lib/VMCore/Verifier.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index a699ab2af205..86413ed6202c 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/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; } }