From: Jim Ingham Date: Tue, 2 Jul 2019 23:38:07 +0000 (+0000) Subject: Fix for r364686 - actually set symbol_is_missing_weak... X-Git-Tag: llvmorg-10-init~1411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=372cee511e274d098356ea148852747c8dda27d5;p=platform%2Fupstream%2Fllvm.git Fix for r364686 - actually set symbol_is_missing_weak... This was set in a std::function, but I was shadowing a variable that I thought I was capturing. Even with this bug we were correctly not raising an error and returning an address of 0x0. We were not marking the symbol as weak, but apparently the JIT didn't need that, so the test still passed. llvm-svn: 364980 --- diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index da74966..00e12f3 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -791,7 +791,8 @@ lldb::addr_t IRExecutionUnit::FindInSymbols( std::function - get_external_load_address = [&best_internal_load_address, target]( + get_external_load_address = [&best_internal_load_address, target, + &symbol_was_missing_weak]( lldb::addr_t &load_address, SymbolContextList &sc_list, const lldb_private::SymbolContext &sc) -> lldb::addr_t { load_address = LLDB_INVALID_ADDRESS; @@ -801,7 +802,7 @@ lldb::addr_t IRExecutionUnit::FindInSymbols( // missing_weak_symbol will be true only if we found only weak undefined // references to this symbol. - bool symbol_was_missing_weak = true; + symbol_was_missing_weak = true; for (auto candidate_sc : sc_list.SymbolContexts()) { // Only symbols can be weak undefined: if (!candidate_sc.symbol)