Fix a crash in DeadFunctionElimination. I introduced the problem with r32123. The crash can happen for some "unusual" class method lookup.
Fix a crash in DeadFunctionElimination.
I introduced the problem with r32123. The crash can happen for some "unusual" class method lookup.

TODO: add a test case for it. Unfortunately I failed to create one. 



Swift SVN r32789

jmgc/swift,modocache/swift,johnno1962d/swift,jopamer/swift,stephentyrone/swift,therealbnut/swift,austinzheng/swift,deyton/swift,xwu/swift,calebd/swift,manavgabhawala/swift,jtbandes/swift,deyton/swift,SwiftAndroid/swift,JGiola/swift,slavapestov/swift,alblue/swift,apple/swift,kstaring/swift,ben-ng/swift,milseman/swift,benlangmuir/swift,cbrentharris/swift,hughbe/swift,ken0nek/swift,calebd/swift,Jnosh/swift,SwiftAndroid/swift,CodaFi/swift,rudkx/swift,shajrawi/swift,kentya6/swift,return/swift,johnno1962d/swift,kentya6/swift,frootloops/swift,OscarSwanros/swift,karwa/swift,kstaring/swift,modocache/swift,practicalswift/swift,sschiau/swift,johnno1962d/swift,shahmishal/swift,frootloops/swift,xedin/swift,felix91gr/swift,jmgc/swift,atrick/swift,dduan/swift,allevato/swift,allevato/swift,slavapestov/swift,lorentey/swift,danielmartin/swift,ken0nek/swift,swiftix/swift.old,kperryua/swift,OscarSwanros/swift,ahoppen/swift,glessard/swift,arvedviehweger/swift,bitjammer/swift,dduan/swift,emilstahl/swift,jmgc/swift,shajrawi/swift,jckarter/swift,roambotics/swift,arvedviehweger/swift,alblue/swift,kusl/swift,practicalswift/swift,natecook1000/swift,tjw/swift,JGiola/swift,roambotics/swift,Ivacker/swift,roambotics/swift,austinzheng/swift,therealbnut/swift,kperryua/swift,apple/swift,LeoShimonaka/swift,milseman/swift,jmgc/swift,lorentey/swift,huonw/swift,MukeshKumarS/Swift,shahmishal/swift,devincoughlin/swift,LeoShimonaka/swift,jckarter/swift,LeoShimonaka/swift,tkremenek/swift,tjw/swift,emilstahl/swift,karwa/swift,atrick/swift,JGiola/swift,sschiau/swift,IngmarStein/swift,aschwaighofer/swift,MukeshKumarS/Swift,mightydeveloper/swift,airspeedswift/swift,emilstahl/swift,russbishop/swift,tkremenek/swift,therealbnut/swift,practicalswift/swift,kusl/swift,huonw/swift,parkera/swift,LeoShimonaka/swift,brentdax/swift,hughbe/swift,parkera/swift,return/swift,jckarter/swift,kentya6/swift,glessard/swift,kperryua/swift,emilstahl/swift,ben-ng/swift,amraboelela/swift,gottesmm/swift,cbrentharris/swift,swiftix/swift.old,sschiau/swift,uasys/swift,parkera/swift,Ivacker/swift,kentya6/swift,karwa/swift,airspeedswift/swift,jopamer/swift,mightydeveloper/swift,emilstahl/swift,IngmarStein/swift,manavgabhawala/swift,codestergit/swift,djwbrown/swift,gregomni/swift,mightydeveloper/swift,danielmartin/swift,stephentyrone/swift,mightydeveloper/swift,hughbe/swift,emilstahl/swift,allevato/swift,glessard/swift,xwu/swift,Jnosh/swift,tinysun212/swift-windows,benlangmuir/swift,harlanhaskins/swift,modocache/swift,tardieu/swift,danielmartin/swift,KrishMunot/swift,airspeedswift/swift,slavapestov/swift,alblue/swift,zisko/swift,uasys/swift,MukeshKumarS/Swift,deyton/swift,gribozavr/swift,swiftix/swift,gmilos/swift,shajrawi/swift,tjw/swift,airspeedswift/swift,ben-ng/swift,LeoShimonaka/swift,gmilos/swift,austinzheng/swift,practicalswift/swift,sdulal/swift,harlanhaskins/swift,modocache/swift,shahmishal/swift,swiftix/swift.old,jtbandes/swift,dduan/swift,rudkx/swift,xwu/swift,atrick/swift,tkremenek/swift,uasys/swift,kentya6/swift,cbrentharris/swift,bitjammer/swift,therealbnut/swift,ken0nek/swift,IngmarStein/swift,JaSpa/swift,alblue/swift,huonw/swift,JaSpa/swift,codestergit/swift,hughbe/swift,shajrawi/swift,kstaring/swift,return/swift,gregomni/swift,jopamer/swift,ahoppen/swift,JaSpa/swift,modocache/swift,lorentey/swift,frootloops/swift,atrick/swift,uasys/swift,apple/swift,kperryua/swift,tinysun212/swift-windows,shahmishal/swift,KrishMunot/swift,zisko/swift,OscarSwanros/swift,tardieu/swift,huonw/swift,austinzheng/swift,CodaFi/swift,gribozavr/swift,gregomni/swift,gottesmm/swift,gregomni/swift,djwbrown/swift,natecook1000/swift,zisko/swift,alblue/swift,xwu/swift,jopamer/swift,stephentyrone/swift,djwbrown/swift,hooman/swift,austinzheng/swift,jtbandes/swift,uasys/swift,gottesmm/swift,danielmartin/swift,harlanhaskins/swift,sdulal/swift,kstaring/swift,allevato/swift,harlanhaskins/swift,emilstahl/swift,brentdax/swift,kusl/swift,brentdax/swift,nathawes/swift,harlanhaskins/swift,aschwaighofer/swift,kusl/swift,Jnosh/swift,cbrentharris/swift,deyton/swift,rudkx/swift,zisko/swift,jmgc/swift,sschiau/swift,xedin/swift,gmilos/swift,bitjammer/swift,tkremenek/swift,aschwaighofer/swift,practicalswift/swift,khizkhiz/swift,gribozavr/swift,swiftix/swift.old,codestergit/swift,calebd/swift,tkremenek/swift,return/swift,felix91gr/swift,ken0nek/swift,harlanhaskins/swift,tardieu/swift,parkera/swift,slavapestov/swift,OscarSwanros/swift,gmilos/swift,MukeshKumarS/Swift,kperryua/swift,tinysun212/swift-windows,karwa/swift,roambotics/swift,brentdax/swift,allevato/swift,modocache/swift,gribozavr/swift,danielmartin/swift,russbishop/swift,OscarSwanros/swift,lorentey/swift,jopamer/swift,hooman/swift,adrfer/swift,JaSpa/swift,ben-ng/swift,MukeshKumarS/Swift,nathawes/swift,xedin/swift,OscarSwanros/swift,arvedviehweger/swift,JGiola/swift,xedin/swift,johnno1962d/swift,tkremenek/swift,kusl/swift,slavapestov/swift,russbishop/swift,Ivacker/swift,nathawes/swift,practicalswift/swift,nathawes/swift,kstaring/swift,tardieu/swift,IngmarStein/swift,russbishop/swift,frootloops/swift,tinysun212/swift-windows,glessard/swift,kentya6/swift,kstaring/swift,MukeshKumarS/Swift,ken0nek/swift,uasys/swift,SwiftAndroid/swift,milseman/swift,huonw/swift,xwu/swift,sschiau/swift,amraboelela/swift,SwiftAndroid/swift,kusl/swift,OscarSwanros/swift,felix91gr/swift,shahmishal/swift,hughbe/swift,khizkhiz/swift,hughbe/swift,IngmarStein/swift,khizkhiz/swift,stephentyrone/swift,gribozavr/swift,ben-ng/swift,practicalswift/swift,benlangmuir/swift,manavgabhawala/swift,IngmarStein/swift,benlangmuir/swift,devincoughlin/swift,milseman/swift,shahmishal/swift,natecook1000/swift,gregomni/swift,apple/swift,swiftix/swift,deyton/swift,milseman/swift,stephentyrone/swift,shajrawi/swift,sdulal/swift,cbrentharris/swift,nathawes/swift,emilstahl/swift,devincoughlin/swift,adrfer/swift,gribozavr/swift,cbrentharris/swift,cbrentharris/swift,ahoppen/swift,sdulal/swift,Ivacker/swift,mightydeveloper/swift,codestergit/swift,aschwaighofer/swift,karwa/swift,adrfer/swift,codestergit/swift,glessard/swift,jmgc/swift,danielmartin/swift,KrishMunot/swift,rudkx/swift,jckarter/swift,swiftix/swift.old,hooman/swift,frootloops/swift,kentya6/swift,natecook1000/swift,tinysun212/swift-windows,brentdax/swift,kstaring/swift,stephentyrone/swift,zisko/swift,LeoShimonaka/swift,devincoughlin/swift,airspeedswift/swift,milseman/swift,Jnosh/swift,swiftix/swift.old,MukeshKumarS/Swift,djwbrown/swift,bitjammer/swift,xedin/swift,bitjammer/swift,Ivacker/swift,swiftix/swift.old,austinzheng/swift,xedin/swift,gregomni/swift,kperryua/swift,kusl/swift,lorentey/swift,mightydeveloper/swift,jckarter/swift,devincoughlin/swift,gmilos/swift,swiftix/swift,parkera/swift,parkera/swift,CodaFi/swift,sdulal/swift,russbishop/swift,johnno1962d/swift,manavgabhawala/swift,jtbandes/swift,KrishMunot/swift,khizkhiz/swift,atrick/swift,KrishMunot/swift,aschwaighofer/swift,benlangmuir/swift,devincoughlin/swift,ahoppen/swift,dduan/swift,swiftix/swift.old,tkremenek/swift,tjw/swift,felix91gr/swift,jtbandes/swift,tardieu/swift,brentdax/swift,adrfer/swift,adrfer/swift,frootloops/swift,JaSpa/swift,return/swift,shahmishal/swift,jckarter/swift,JaSpa/swift,dduan/swift,tinysun212/swift-windows,arvedviehweger/swift,manavgabhawala/swift,arvedviehweger/swift,huonw/swift,felix91gr/swift,Jnosh/swift,atrick/swift,therealbnut/swift,swiftix/swift,bitjammer/swift,rudkx/swift,natecook1000/swift,calebd/swift,shajrawi/swift,arvedviehweger/swift,djwbrown/swift,hughbe/swift,stephentyrone/swift,xedin/swift,harlanhaskins/swift,shajrawi/swift,parkera/swift,CodaFi/swift,djwbrown/swift,zisko/swift,sschiau/swift,SwiftAndroid/swift,calebd/swift,felix91gr/swift,lorentey/swift,jopamer/swift,sschiau/swift,allevato/swift,mightydeveloper/swift,LeoShimonaka/swift,KrishMunot/swift,xwu/swift,gribozavr/swift,felix91gr/swift,gribozavr/swift,amraboelela/swift,deyton/swift,amraboelela/swift,dduan/swift,milseman/swift,SwiftAndroid/swift,codestergit/swift,amraboelela/swift,sdulal/swift,CodaFi/swift,calebd/swift,nathawes/swift,arvedviehweger/swift,mightydeveloper/swift,xedin/swift,dreamsxin/swift,jmgc/swift,ahoppen/swift,Jnosh/swift,CodaFi/swift,kperryua/swift,alblue/swift,dreamsxin/swift,apple/swift,benlangmuir/swift,russbishop/swift,codestergit/swift,karwa/swift,sschiau/swift,xwu/swift,slavapestov/swift,swiftix/swift,natecook1000/swift,tjw/swift,Ivacker/swift,lorentey/swift,tjw/swift,return/swift,jckarter/swift,therealbnut/swift,alblue/swift,return/swift,gottesmm/swift,JGiola/swift,zisko/swift,devincoughlin/swift,bitjammer/swift,manavgabhawala/swift,dduan/swift,jtbandes/swift,swiftix/swift,ben-ng/swift,jopamer/swift,Jnosh/swift,karwa/swift,sdulal/swift,KrishMunot/swift,aschwaighofer/swift,roambotics/swift,JGiola/swift,adrfer/swift,hooman/swift,khizkhiz/swift,adrfer/swift,ahoppen/swift,amraboelela/swift,lorentey/swift,russbishop/swift,JaSpa/swift,aschwaighofer/swift,roambotics/swift,modocache/swift,huonw/swift,airspeedswift/swift,rudkx/swift,djwbrown/swift,tardieu/swift,LeoShimonaka/swift,danielmartin/swift,hooman/swift,gmilos/swift,devincoughlin/swift,brentdax/swift,gottesmm/swift,parkera/swift,IngmarStein/swift,swiftix/swift,SwiftAndroid/swift,ben-ng/swift,slavapestov/swift,natecook1000/swift,uasys/swift,gottesmm/swift,nathawes/swift,therealbnut/swift,johnno1962d/swift,khizkhiz/swift,apple/swift,airspeedswift/swift,deyton/swift,ken0nek/swift,manavgabhawala/swift,karwa/swift,sdulal/swift,ken0nek/swift,jtbandes/swift,gmilos/swift,CodaFi/swift,tinysun212/swift-windows,frootloops/swift,allevato/swift,gottesmm/swift,practicalswift/swift,cbrentharris/swift,johnno1962d/swift,calebd/swift,Ivacker/swift,shahmishal/swift,Ivacker/swift,kentya6/swift,hooman/swift,tardieu/swift,amraboelela/swift,austinzheng/swift,hooman/swift,kusl/swift,shajrawi/swift,tjw/swift,glessard/swift,khizkhiz/swift