Revert r231545 to unbreak buildbot.

This patch reverts r231545 "PECOFF: Do not add extraneous symbols
to the dead strip root." CrWinClangLLD buildbot is currently broken.
Since I can't reproduce the issue locally, I'm reverting the most
relevant change.

llvm-svn: 231582
This commit is contained in:
Rui Ueyama 2015-03-08 00:26:53 +00:00
parent 8c58c066b7
commit 316d64ea1d
1 changed files with 5 additions and 3 deletions

View File

@ -375,10 +375,8 @@ void FileCOFF::beforeLink() {
// Add /INCLUDE'ed symbols to the file as if they existed in the
// file as undefined symbols.
for (StringRef sym : undefSyms) {
for (StringRef sym : undefSyms)
addUndefinedSymbol(sym);
_ctx.addDeadStripRoot(sym);
}
// One can define alias symbols using /alternatename:<sym>=<sym> option.
// The mapping for /alternatename is in the context object. This helper
@ -389,6 +387,10 @@ void FileCOFF::beforeLink() {
// SEH. Disable SEH if the file being read is not compatible.
if (!isCompatibleWithSEH())
_ctx.setSafeSEH(false);
if (_ctx.deadStrip())
for (const UndefinedAtom *undef : undefined())
_ctx.addDeadStripRoot(undef->name());
}
/// Iterate over the symbol table to retrieve all symbols.