lldb wasn't handling weak symbols, so if you were debugging a binary that used a weak symbol, and the symbol was missing, any references to the symbol would result in a symbol not found error. But it is actually legitimate to refer to missing weak symbols, you just have to test them against NULL first.
This patch does three things:
- Adds a bit to indicate weakness to Symbol and IsWeak & SetIsWeak accessors
- Teaches the ObjectFileMachO to detect weak symbols and mark them appropriately
- Gets the symbol -> address lookup in IRExecutionUnit.cpp to mark missing weak symbols as such.
This will increase the size of Symbol since this extra bit makes it go over 16 bits in size. We can steal a bit away from m_type since it is used to hold lldb::SymbolType and we only have 28 lldb::SymbolType enums. You might need to check that the Swift branch didn't add any.