diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-11-18 23:09:31 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-11-18 23:09:31 +0000 |
commit | c5b795e8ce28076aeb64ac4342b725bceac3607e (patch) | |
tree | fc1350057a367335de208848a5f9dab57f7ed55a /lib/VMCore/Verifier.cpp | |
parent | 63a431c6704e711713b0258bd987cfb257767cf4 (diff) | |
download | external_llvm-c5b795e8ce28076aeb64ac4342b725bceac3607e.zip external_llvm-c5b795e8ce28076aeb64ac4342b725bceac3607e.tar.gz external_llvm-c5b795e8ce28076aeb64ac4342b725bceac3607e.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index a699ab2..86413ed 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<AllocaInst>(CI.getOperand(2)), + "llvm.stackprotector parameter #2 must resolve to an alloca.", + &CI); + break; } } |