[lld] [RFC] [LLD] [COFF] Restructure /debug: option handling, allow controlling features separately (PR #74820)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 03:32:33 PST 2023
================
@@ -858,46 +858,6 @@ static std::string createResponseFile(const opt::InputArgList &args,
return std::string(data.str());
}
-enum class DebugKind {
- Unknown,
- None,
- Full,
- FastLink,
- GHash,
- NoGHash,
- Dwarf,
- Symtab
-};
-
-static DebugKind parseDebugKind(const opt::InputArgList &args) {
- auto *a = args.getLastArg(OPT_debug, OPT_debug_opt);
- if (!a)
- return DebugKind::None;
- if (a->getNumValues() == 0)
- return DebugKind::Full;
-
- DebugKind debug = StringSwitch<DebugKind>(a->getValue())
- .CaseLower("none", DebugKind::None)
- .CaseLower("full", DebugKind::Full)
- .CaseLower("fastlink", DebugKind::FastLink)
- // LLD extensions
- .CaseLower("ghash", DebugKind::GHash)
----------------
mstorsjo wrote:
@aganea I guess that sounds reasonable, although I'd prefer not to take on that kind of a change in behaviour as part of this patchset, it's tricky enough as it is (even if I guess it would make the code a bit simpler in some places) - I'd leave that to someone more familiar with PDB/ghash overall.
https://github.com/llvm/llvm-project/pull/74820
More information about the llvm-commits
mailing list