[Driver] refactor part of the code to getOutputKind.
[Driver] refactor part of the code to getOutputKind.

No functionaility change.

rdar://19048891


Swift SVN r25557

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