Replace two for loops with while(!X->use_empty()) loops. This prevents
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 14 Aug 2008 15:03:05 +0000 (15:03 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Thu, 14 Aug 2008 15:03:05 +0000 (15:03 +0000)
commitc1f1d46f000eacceaa861e5b083ef0424cb9b41a
treea249bfdf33e7a8320c861bbe00fa3c229aaab079
parent97382166dd09ffafa91015cbf752bac4497abc08
Replace two for loops with while(!X->use_empty()) loops. This prevents
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.

Also remove an unneeded if.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54778 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/StructRetPromotion.cpp