Remove a trivial function.

llvm-svn: 315164
This commit is contained in:
Rui Ueyama 2017-10-08 02:06:03 +00:00
parent e8936bca72
commit 9b18f50f79
3 changed files with 1 additions and 4 deletions

View File

@ -871,8 +871,6 @@ ExprValue LinkerScript::getSymbolValue(const Twine &Loc, StringRef S) {
return 0;
}
bool LinkerScript::isDefined(StringRef S) { return Symtab->find(S) != nullptr; }
static const size_t NoPhdr = -1;
// Returns indices of ELF headers containing specific section. Each index is a

View File

@ -241,7 +241,6 @@ public:
void discard(ArrayRef<InputSectionBase *> V);
ExprValue getSymbolValue(const Twine &Loc, StringRef S);
bool isDefined(StringRef S);
void fabricateDefaultCommands();
void addOrphanSections(OutputSectionFactory &Factory);

View File

@ -1007,7 +1007,7 @@ Expr ScriptParser::readPrimary() {
}
if (Tok == "DEFINED") {
StringRef Name = readParenLiteral();
return [=] { return Script->isDefined(Name) ? 1 : 0; };
return [=] { return Symtab->find(Name) ? 1 : 0; };
}
if (Tok == "LENGTH") {
StringRef Name = readParenLiteral();