@@ -3315,9 +3315,6 @@ static void GenerateHeaderSearchArgs(const HeaderSearchOptions &Opts,
3315
3315
if (Opts.UseLibcxx )
3316
3316
GenerateArg (Consumer, OPT_stdlib_EQ, " libc++" );
3317
3317
3318
- if (!Opts.ModuleCachePath .empty ())
3319
- GenerateArg (Consumer, OPT_fmodules_cache_path, Opts.ModuleCachePath );
3320
-
3321
3318
for (const auto &File : Opts.PrebuiltModuleFiles )
3322
3319
GenerateArg (Consumer, OPT_fmodule_file, File.first + " =" + File.second );
3323
3320
@@ -3420,8 +3417,7 @@ static void GenerateHeaderSearchArgs(const HeaderSearchOptions &Opts,
3420
3417
}
3421
3418
3422
3419
static bool ParseHeaderSearchArgs (HeaderSearchOptions &Opts, ArgList &Args,
3423
- DiagnosticsEngine &Diags,
3424
- const std::string &WorkingDir) {
3420
+ DiagnosticsEngine &Diags) {
3425
3421
unsigned NumErrorsBefore = Diags.getNumErrors ();
3426
3422
3427
3423
HeaderSearchOptions *HeaderSearchOpts = &Opts;
@@ -3434,17 +3430,6 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
3434
3430
if (const Arg *A = Args.getLastArg (OPT_stdlib_EQ))
3435
3431
Opts.UseLibcxx = (strcmp (A->getValue (), " libc++" ) == 0 );
3436
3432
3437
- // Canonicalize -fmodules-cache-path before storing it.
3438
- SmallString<128 > P (Args.getLastArgValue (OPT_fmodules_cache_path));
3439
- if (!(P.empty () || llvm::sys::path::is_absolute (P))) {
3440
- if (WorkingDir.empty ())
3441
- llvm::sys::fs::make_absolute (P);
3442
- else
3443
- llvm::sys::fs::make_absolute (WorkingDir, P);
3444
- }
3445
- llvm::sys::path::remove_dots (P);
3446
- Opts.ModuleCachePath = std::string (P);
3447
-
3448
3433
// Only the -fmodule-file=<name>=<file> form.
3449
3434
for (const auto *A : Args.filtered (OPT_fmodule_file)) {
3450
3435
StringRef Val = A->getValue ();
@@ -5021,8 +5006,7 @@ bool CompilerInvocation::CreateFromArgsImpl(
5021
5006
InputKind DashX = Res.getFrontendOpts ().DashX ;
5022
5007
ParseTargetArgs (Res.getTargetOpts (), Args, Diags);
5023
5008
llvm::Triple T (Res.getTargetOpts ().Triple );
5024
- ParseHeaderSearchArgs (Res.getHeaderSearchOpts (), Args, Diags,
5025
- Res.getFileSystemOpts ().WorkingDir );
5009
+ ParseHeaderSearchArgs (Res.getHeaderSearchOpts (), Args, Diags);
5026
5010
if (Res.getFrontendOpts ().GenReducedBMI ||
5027
5011
Res.getFrontendOpts ().ProgramAction ==
5028
5012
frontend::GenerateReducedModuleInterface ||
0 commit comments