|
@@ -41,17 +41,16 @@ static int skipArgs(const char *Flag, bool HaveCrashVFS) {
|
|
// These flags are all of the form -Flag <Arg> and are treated as two
|
|
// These flags are all of the form -Flag <Arg> and are treated as two
|
|
// arguments. Therefore, we need to skip the flag and the next argument.
|
|
// arguments. Therefore, we need to skip the flag and the next argument.
|
|
bool Res = llvm::StringSwitch<bool>(Flag)
|
|
bool Res = llvm::StringSwitch<bool>(Flag)
|
|
- .Cases("-I", "-MF", "-MT", "-MQ", true)
|
|
|
|
|
|
+ .Cases("-MF", "-MT", "-MQ", "-serialize-diagnostic-file", true)
|
|
.Cases("-o", "-coverage-file", "-dependency-file", true)
|
|
.Cases("-o", "-coverage-file", "-dependency-file", true)
|
|
.Cases("-fdebug-compilation-dir", "-idirafter", true)
|
|
.Cases("-fdebug-compilation-dir", "-idirafter", true)
|
|
.Cases("-include", "-include-pch", "-internal-isystem", true)
|
|
.Cases("-include", "-include-pch", "-internal-isystem", true)
|
|
.Cases("-internal-externc-isystem", "-iprefix", "-iwithprefix", true)
|
|
.Cases("-internal-externc-isystem", "-iprefix", "-iwithprefix", true)
|
|
.Cases("-iwithprefixbefore", "-isystem", "-iquote", true)
|
|
.Cases("-iwithprefixbefore", "-isystem", "-iquote", true)
|
|
- .Cases("-resource-dir", "-serialize-diagnostic-file", true)
|
|
|
|
.Cases("-dwarf-debug-flags", "-ivfsoverlay", true)
|
|
.Cases("-dwarf-debug-flags", "-ivfsoverlay", true)
|
|
.Cases("-header-include-file", "-diagnostic-log-file", true)
|
|
.Cases("-header-include-file", "-diagnostic-log-file", true)
|
|
// Some include flags shouldn't be skipped if we have a crash VFS
|
|
// Some include flags shouldn't be skipped if we have a crash VFS
|
|
- .Case("-isysroot", !HaveCrashVFS)
|
|
|
|
|
|
+ .Cases("-isysroot", "-I", "-F", "-resource-dir", !HaveCrashVFS)
|
|
.Default(false);
|
|
.Default(false);
|
|
|
|
|
|
// Match found.
|
|
// Match found.
|
|
@@ -72,7 +71,8 @@ static int skipArgs(const char *Flag, bool HaveCrashVFS) {
|
|
|
|
|
|
// These flags are treated as a single argument (e.g., -F<Dir>).
|
|
// These flags are treated as a single argument (e.g., -F<Dir>).
|
|
StringRef FlagRef(Flag);
|
|
StringRef FlagRef(Flag);
|
|
- if (FlagRef.startswith("-F") || FlagRef.startswith("-I") ||
|
|
|
|
|
|
+ if ((!HaveCrashVFS &&
|
|
|
|
+ (FlagRef.startswith("-F") || FlagRef.startswith("-I"))) ||
|
|
FlagRef.startswith("-fmodules-cache-path="))
|
|
FlagRef.startswith("-fmodules-cache-path="))
|
|
return 1;
|
|
return 1;
|
|
|
|
|