summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Symbols.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-08-17 23:35:43 +0000
committerRui Ueyama <ruiu@google.com>2015-08-17 23:35:43 +0000
commit7171c8219447c3a6803b1f1c21e6af5665aaca08 (patch)
tree675dbc16c0dd70bf51b89e922f765908515eebc3 /lld/COFF/Symbols.cpp
parenta3f6f9477b0781617102a0e62695fcd0ea5ca942 (diff)
downloadbcm5719-llvm-7171c8219447c3a6803b1f1c21e6af5665aaca08.tar.gz
bcm5719-llvm-7171c8219447c3a6803b1f1c21e6af5665aaca08.zip
COFF: Allow forward reference for weak externals
Previously, weak external symbols could reference only symbols that appeared before them. Although that covers almost all use cases of weak externals, there are object files out there which contains weak externals that have forward references. This patch supports such weak externals. llvm-svn: 245258
Diffstat (limited to 'lld/COFF/Symbols.cpp')
-rw-r--r--lld/COFF/Symbols.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/COFF/Symbols.cpp b/lld/COFF/Symbols.cpp
index c0324fdb3be..d732d76cfb0 100644
--- a/lld/COFF/Symbols.cpp
+++ b/lld/COFF/Symbols.cpp
@@ -132,7 +132,7 @@ int SymbolBody::compare(SymbolBody *Other) {
auto *RHS = cast<Undefined>(Other);
// Tie if both undefined symbols have different weak aliases.
if (LHS->WeakAlias && RHS->WeakAlias) {
- if (LHS->WeakAlias->repl() != RHS->WeakAlias->repl())
+ if (LHS->WeakAlias->getName() != RHS->WeakAlias->getName())
return 0;
return uintptr_t(LHS) < uintptr_t(RHS) ? 1 : -1;
}
OpenPOWER on IntegriCloud