Fixed a segfault in gccld.
authorJohn Criswell <criswell@uiuc.edu>
Thu, 7 Aug 2003 14:43:13 +0000 (14:43 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Thu, 7 Aug 2003 14:43:13 +0000 (14:43 +0000)
commit7d3c5795f9624cd2fd9cdf9a61a9eb055bbead4b
treee4d0f9bc47e8eb13688a99d589d8577b11f8ef70
parentec4f52317819e24cb2661559af58593f0a444bd8
Fixed a segfault in gccld.
The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called.  To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().

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