Fix IRGen bug with local functions.  <rdar://problem/11935459>.
Fix IRGen bug with local functions.  <rdar://problem/11935459>.



Swift SVN r2434

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