[lld] 8d84751 - Revert "[LLD] [COFF] Avoid doing repeated fuzzy symbol lookup for each iteration. NFC."
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 22 11:36:36 PDT 2021
Author: Reid Kleckner
Date: 2021-06-22T11:35:14-07:00
New Revision: 8d84751ac488ad11e0964704e9ea5366731355f7
URL: https://github.com/llvm/llvm-project/commit/8d84751ac488ad11e0964704e9ea5366731355f7
DIFF: https://github.com/llvm/llvm-project/commit/8d84751ac488ad11e0964704e9ea5366731355f7.diff
LOG: Revert "[LLD] [COFF] Avoid doing repeated fuzzy symbol lookup for each iteration. NFC."
This reverts commit e1adf90826a57b674eee79b071fb46c1f5683cd0.
This appears to affect the way that C++ mangled symbols appear in the
import library when using a .def file that names a C++ free function
with no name decoration. I will follow up with a reduced test case
shortly.
Added:
Modified:
lld/COFF/Driver.cpp
Removed:
################################################################################
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 5eab3fbbde069..97b3c9029e34f 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -549,7 +549,7 @@ Symbol *LinkerDriver::addUndefined(StringRef name) {
StringRef LinkerDriver::mangleMaybe(Symbol *s) {
// If the plain symbol name has already been resolved, do nothing.
Undefined *unmangled = dyn_cast<Undefined>(s);
- if (!unmangled || unmangled->getWeakAlias())
+ if (!unmangled)
return "";
// Otherwise, see if a similar, mangled symbol exists in the symbol table.
More information about the llvm-commits
mailing list