[llvm-commits] [llvm] r55227 - /llvm/trunk/lib/VMCore/Verifier.cpp

Chris Lattner clattner at apple.com
Sun Aug 24 13:46:40 PDT 2008


On Aug 23, 2008, at 6:19 PM, Gordon Henriksen wrote:

> Yup. The code in question verifies more than the prototypes.
>
>> -        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);
>
>
>> -      Assert1(CI.getParent()->getParent()->hasGC(),
>> -              "Enclosing function does not use GC.",
>> -              &CI);
>
> The rest is a holdover from when these intrinsics allowed arbitrary  
> types.
>
> We could verify these 3 cases and fall through to the default case  
> for the rest; or just drop the type checks if the prototypes are  
> already verified.

Done, thanks!

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080824/992e3dc8/attachment.html>


More information about the llvm-commits mailing list