[LLD][ELF] - Remove UnresolvedPolicy::IgnoreAll and relative code. NFC.
The code involved was simply dead. `IgnoreAll` value is used in `maybeReportUndefined` only which is never called for -r. And at the same time `IgnoreAll` was set only for -r. llvm-svn: 339672
This commit is contained in:
parent
44780cc3b9
commit
152e3c98ac
|
@ -47,7 +47,7 @@ enum class ICFLevel { None, Safe, All };
|
|||
enum class StripPolicy { None, All, Debug };
|
||||
|
||||
// For --unresolved-symbols.
|
||||
enum class UnresolvedPolicy { ReportError, Warn, Ignore, IgnoreAll };
|
||||
enum class UnresolvedPolicy { ReportError, Warn, Ignore };
|
||||
|
||||
// For --orphan-handling.
|
||||
enum class OrphanHandlingPolicy { Place, Warn, Error };
|
||||
|
|
|
@ -450,9 +450,6 @@ static std::string getRpath(opt::InputArgList &Args) {
|
|||
// Determines what we should do if there are remaining unresolved
|
||||
// symbols after the name resolution.
|
||||
static UnresolvedPolicy getUnresolvedSymbolPolicy(opt::InputArgList &Args) {
|
||||
if (Args.hasArg(OPT_relocatable))
|
||||
return UnresolvedPolicy::IgnoreAll;
|
||||
|
||||
UnresolvedPolicy ErrorOrWarn = Args.hasFlag(OPT_error_unresolved_symbols,
|
||||
OPT_warn_unresolved_symbols, true)
|
||||
? UnresolvedPolicy::ReportError
|
||||
|
|
|
@ -622,9 +622,6 @@ static int64_t computeAddend(const RelTy &Rel, const RelTy *End,
|
|||
// Returns true if this function printed out an error message.
|
||||
static bool maybeReportUndefined(Symbol &Sym, InputSectionBase &Sec,
|
||||
uint64_t Offset) {
|
||||
if (Config->UnresolvedSymbols == UnresolvedPolicy::IgnoreAll)
|
||||
return false;
|
||||
|
||||
if (Sym.isLocal() || !Sym.isUndefined() || Sym.isWeak())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue