summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Object/ArchiveWriter.cpp3
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp8
2 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index c9796736896..ea17b2220a0 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -294,8 +294,7 @@ static bool isArchiveSymbol(const object::BasicSymbolRef &S) {
return false;
if (!(Symflags & object::SymbolRef::SF_Global))
return false;
- if (Symflags & object::SymbolRef::SF_Undefined &&
- !(Symflags & object::SymbolRef::SF_Indirect))
+ if (Symflags & object::SymbolRef::SF_Undefined)
return false;
return true;
}
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 26194888ac0..d72da3187e0 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -217,10 +217,10 @@ uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
if (Symb.isExternal() || Symb.isWeakExternal())
Result |= SymbolRef::SF_Global;
- if (Symb.isWeakExternal()) {
+ if (const coff_aux_weak_external *AWE = Symb.getWeakExternal()) {
Result |= SymbolRef::SF_Weak;
- // We use indirect to allow the archiver to write weak externs
- Result |= SymbolRef::SF_Indirect;
+ if (AWE->Characteristics != COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS)
+ Result |= SymbolRef::SF_Undefined;
}
if (Symb.getSectionNumber() == COFF::IMAGE_SYM_ABSOLUTE)
@@ -235,7 +235,7 @@ uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
if (Symb.isCommon())
Result |= SymbolRef::SF_Common;
- if (Symb.isAnyUndefined())
+ if (Symb.isUndefined())
Result |= SymbolRef::SF_Undefined;
return Result;
OpenPOWER on IntegriCloud