[llvm] b796acb - [llvm][MachO] fix adding weak def syms

Cyndy Ishida via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 17:10:49 PST 2020


Author: Cyndy Ishida
Date: 2020-03-02T17:00:24-08:00
New Revision: b796acbba24fb97e260c00c45cdf356c7a635581

URL: https://github.com/llvm/llvm-project/commit/b796acbba24fb97e260c00c45cdf356c7a635581
DIFF: https://github.com/llvm/llvm-project/commit/b796acbba24fb97e260c00c45cdf356c7a635581.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/TextAPI/MachO/TextStub.cpp

Removed: 
    


################################################################################
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<const InterfaceFile *> {
 
           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,


        


More information about the llvm-commits mailing list