Store a Symbol for EntrySym.
This makes it impossible to forget to call repl on the SymbolBody.
llvm-svn: 266432
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 4eb00bd..f8d5b10 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -428,7 +428,7 @@
// Set either EntryAddr (if S is a number) or EntrySym (otherwise).
StringRef S = Config->Entry;
if (S.getAsInteger(0, Config->EntryAddr))
- Config->EntrySym = Symtab.addUndefined(S);
+ Config->EntrySym = Symtab.addUndefined(S)->getSymbol();
}
for (std::unique_ptr<InputFile> &F : Files)