From b796acbba24fb97e260c00c45cdf356c7a635581 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 2 Mar 2020 16:58:14 -0800 Subject: [PATCH] [llvm][MachO] fix adding weak def syms the weak defined symbol flag was missing from the call site for adding symbols which didn't cause issues because it invoked the default parameter. --- llvm/lib/TextAPI/MachO/TextStub.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/TextAPI/MachO/TextStub.cpp b/llvm/lib/TextAPI/MachO/TextStub.cpp index cdfe7f47ee61..5637639b8ef8 100644 --- a/llvm/lib/TextAPI/MachO/TextStub.cpp +++ b/llvm/lib/TextAPI/MachO/TextStub.cpp @@ -959,7 +959,8 @@ template <> struct MappingTraits { for (auto &sym : CurrentSection.WeakSymbols) File->addSymbol(SymbolKind::GlobalSymbol, sym, - CurrentSection.Targets); + CurrentSection.Targets, SymbolFlags::WeakDefined); + for (auto &sym : CurrentSection.TlvSymbols) File->addSymbol(SymbolKind::GlobalSymbol, sym, CurrentSection.Targets,