1414
1515#include  " swift/AST/DiagnosticsDriver.h" 
1616#include  " swift/AST/PlatformKind.h" 
17+ #include  " swift/Basic/Dwarf.h" 
1718#include  " swift/Basic/LLVM.h" 
1819#include  " swift/Basic/Platform.h" 
1920#include  " swift/Basic/Range.h" 
@@ -625,28 +626,6 @@ toolchains::Darwin::addDeploymentTargetArgs(ArgStringList &Arguments,
625626  }
626627}
627628
628- static  unsigned  getDWARFVersionForTriple (const  llvm::Triple &triple) {
629-   llvm::VersionTuple osVersion;
630-   const  DarwinPlatformKind kind = getDarwinPlatformKind (triple);
631-   switch  (kind) {
632-   case  DarwinPlatformKind::MacOS:
633-     triple.getMacOSXVersion (osVersion);
634-     if  (osVersion < llvm::VersionTuple (10 , 11 ))
635-       return  2 ;
636-     return  4 ;
637-   case  DarwinPlatformKind::IPhoneOSSimulator:
638-   case  DarwinPlatformKind::IPhoneOS:
639-   case  DarwinPlatformKind::TvOS:
640-   case  DarwinPlatformKind::TvOSSimulator:
641-     osVersion = triple.getiOSVersion ();
642-     if  (osVersion < llvm::VersionTuple (9 ))
643-       return  2 ;
644-     return  4 ;
645-   default :
646-     return  4 ;
647-   }
648- }
649- 
650629void  toolchains::Darwin::addCommonFrontendArgs (
651630    const  OutputInfo &OI, const  CommandOutput &output,
652631    const  llvm::opt::ArgList &inputArgs,
@@ -665,16 +644,6 @@ void toolchains::Darwin::addCommonFrontendArgs(
665644          inputArgs.MakeArgString (variantSDKVersion->getAsString ()));
666645    }
667646  }
668-   std::string dwarfVersion;
669-   {
670-     llvm::raw_string_ostream os (dwarfVersion);
671-     os << " -dwarf-version=" 
672-     if  (OI.DWARFVersion )
673-       os << *OI.DWARFVersion ;
674-     else 
675-       os << getDWARFVersionForTriple (getTriple ());
676-   }
677-   arguments.push_back (inputArgs.MakeArgString (dwarfVersion));
678647}
679648
680649// / Add the frontend arguments needed to find external plugins in standard
0 commit comments