@@ -66,11 +66,6 @@ void CompilerInvocation::setMainExecutablePath(StringRef Path) {
6666 Path, FrontendOpts.UseSharedResourceFolder , LibPath);
6767 setRuntimeResourcePath (LibPath.str ());
6868
69- llvm::SmallString<128 > clangPath (Path);
70- llvm::sys::path::remove_filename (clangPath);
71- llvm::sys::path::append (clangPath, " clang" );
72- ClangImporterOpts.clangPath = std::string (clangPath);
73-
7469 llvm::SmallString<128 > DiagnosticDocsPath (Path);
7570 llvm::sys::path::remove_filename (DiagnosticDocsPath); // Remove /swift
7671 llvm::sys::path::remove_filename (DiagnosticDocsPath); // Remove /bin
@@ -941,18 +936,6 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
941936 StringRef workingDirectory) {
942937 using namespace options ;
943938
944- if (const Arg *a = Args.getLastArg (OPT_tools_directory)) {
945- // If a custom tools directory is specified, try to find Clang there.
946- // This is useful when the Swift executable is located in a different
947- // directory than the Clang/LLVM executables, for example, when building
948- // the Swift project itself.
949- llvm::SmallString<128 > clangPath (a->getValue ());
950- llvm::sys::path::append (clangPath, " clang" );
951- if (llvm::sys::fs::exists (clangPath)) {
952- Opts.clangPath = std::string (clangPath);
953- }
954- }
955-
956939 if (const Arg *A = Args.getLastArg (OPT_module_cache_path)) {
957940 Opts.ModuleCachePath = A->getValue ();
958941 }
0 commit comments