forked from OSchip/llvm-project
Resolver: Do not use assert() to notify user input error.
llvm-svn: 189775
This commit is contained in:
parent
900a501bdd
commit
4313451ba4
|
@ -293,7 +293,11 @@ void Resolver::deadStripOptimize() {
|
||||||
// Or, use list of names that are dead stip roots.
|
// Or, use list of names that are dead stip roots.
|
||||||
for (const StringRef &name : _context.deadStripRoots()) {
|
for (const StringRef &name : _context.deadStripRoots()) {
|
||||||
const Atom *symAtom = _symbolTable.findByName(name);
|
const Atom *symAtom = _symbolTable.findByName(name);
|
||||||
assert(symAtom->definition() != Atom::definitionUndefined);
|
if (symAtom->definition() == Atom::definitionUndefined) {
|
||||||
|
llvm::errs() << "Dead strip root '" << symAtom->name()
|
||||||
|
<< "' is not defined\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
_deadStripRoots.insert(symAtom);
|
_deadStripRoots.insert(symAtom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue