OSDN Git Service

IR: Don't cast the end iterator to Instruction*
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 11 Aug 2016 15:45:04 +0000 (15:45 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 11 Aug 2016 15:45:04 +0000 (15:45 +0000)
commit9040acb5e328360f921beca8da81476dcb12323c
tree62900b3c19de011d17433dedbce627533156d310
parent91c138b3e0cd166b827c0bebf50e1da81ea5d447
IR: Don't cast the end iterator to Instruction*

End iterators are usually sentinels, not actually Instruction* at all.
Stop casting to it just to get an iterator back.

There is likely no observable functionality change here right now
(although this is relying on UB, I doubt it was triggering anything),
but I'll be removing the cast soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278346 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Core.cpp