Fix rdar://7879828 - crash in CallGraph, a self host issue.
authorChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 00:46:50 +0000 (00:46 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 00:46:50 +0000 (00:46 +0000)
commiteae220259fca393adc874ed41e3930011047beb7
tree698cbbe993f16ec1e79ef85b0925c1d1c7234f3e
parent084751cd16c3b8017b5a237bd2575b65a6543f79
Fix rdar://7879828 - crash in CallGraph, a self host issue.
Arg promotion was deleting call graph nodes that still had references
from the 'indirect' CGN.  Like the inliner, it should only delete the
function if all references are gone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101845 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ArgumentPromotion.cpp
test/Transforms/ArgumentPromotion/crash.ll [new file with mode: 0644]