[frontend] Adjusted the algorithm for determining a fallback module name.
[frontend] Adjusted the algorithm for determining a fallback module name.

If the OutputFilename points to a directory, fall back to the first
InputFilename.

This matches the behavior of the swift executable, and matches what would be
chosen if we could resolve the correct OutputFilename without knowing the module
name.

Swift SVN r12935

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