Introduce a separate #filePath, remove -pound-file

This makes the path behavior more first-class. The feature is now hidden behind an experimental flag, -enable-experimental-concise-pound-file.
This commit is contained in:
Brent Royal-Gordon
2019-11-21 15:06:23 -08:00
parent 2acaf387c1
commit 63ec1cf5af
27 changed files with 120 additions and 42 deletions

View File

@@ -453,16 +453,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.OptimizationRemarkMissedPattern =
generateOptimizationRemarkRegex(Diags, Args, A);
if (Arg *A = Args.getLastArg(OPT_pound_file)) {
StringRef value = A->getValue();
if (value == "path")
Opts.MagicFileIdentifierEvaluatesToPath = true;
else if (value == "compact")
Opts.MagicFileIdentifierEvaluatesToPath = false;
else
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
A->getSpelling(), value);
}
Opts.EnableConcisePoundFile =
Args.hasArg(OPT_enable_experimental_concise_pound_file);
llvm::Triple Target = Opts.Target;
StringRef TargetArg;