[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp

Jim Laskey jlaskey at apple.com
Thu Jun 8 08:52:38 PDT 2006


Vladimir,

The e = end() is no longer needed.

Cheers,

-- Jim


On Jun 8, 2006, at 12:46 PM, Vladimir Prus wrote:

> +Instruction* BasicBlock::getFirstNonPHI()
> +{
> +    BasicBlock::iterator i = begin(), e = end();
> +    // All valid basic blocks should have a terminator,
> +    // which is not a PHINode. If we have invalid basic
> +    // block we'll get assert when dereferencing past-the-end
> +    // iterator.
> +    while (isa<PHINode>(i)) ++i;
> +    return &*i;
> +}
> +

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20060608/0e906f44/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20060608/0e906f44/attachment.bin>


More information about the llvm-commits mailing list