Revert "Make the DWARF version emitted by the Swift compiler configurable."

This commit is contained in:
Adrian Prantl
2023-10-25 13:28:28 -07:00
committed by GitHub
parent 12b500878c
commit 2a32ca5944
19 changed files with 69 additions and 104 deletions

View File

@@ -2472,6 +2472,7 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.DebugCompilationDir = std::string(cwd.str());
}
}
if (const Arg *A = Args.getLastArg(options::OPT_debug_info_format)) {
if (A->containsValue("dwarf"))
Opts.DebugInfoFormat = IRGenDebugInfoFormat::DWARF;
@@ -2501,16 +2502,6 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
: "-gdwarf_types");
}
if (auto A = Args.getLastArg(OPT_dwarf_version)) {
unsigned vers;
if (!StringRef(A->getValue()).getAsInteger(10, vers) && vers >= 2 &&
vers <= 5)
Opts.DWARFVersion = vers;
else
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
A->getAsString(Args), A->getValue());
}
for (auto A : Args.getAllArgValues(options::OPT_file_prefix_map)) {
auto SplitMap = StringRef(A).split('=');
Opts.FilePrefixMap.addMapping(SplitMap.first, SplitMap.second);