<rdar://problem/10997402>

This fix really needed to happen as a previous fix I had submitted for
calculating symbol sizes made many symbols appear to have zero size since
the function that was calculating the symbol size was calling another function
that would cause the calculation to happen again. This resulted in some symbols
having zero size when they shouldn't. This could then cause infinite stack
traces and many other side affects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152244 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index c9f08eb..12b35f9 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -732,7 +732,7 @@
     if (sym_ctx.function)
         func_so_addr = &sym_ctx.function->GetAddressRange().GetBaseAddress();
     else if (sym_ctx.symbol)
-        func_so_addr = &sym_ctx.symbol->GetAddressRangeRef().GetBaseAddress();
+        func_so_addr = &sym_ctx.symbol->GetAddress();
     else
         return false;
     
@@ -759,7 +759,7 @@
         SymbolContext sym_ctx;
         sc_list.GetContextAtIndex(i, sym_ctx);
     
-        const Address *sym_address = &sym_ctx.symbol->GetAddressRangeRef().GetBaseAddress();
+        const Address *sym_address = &sym_ctx.symbol->GetAddress();
         
         if (!sym_address || !sym_address->IsValid())
             return LLDB_INVALID_ADDRESS;
@@ -1036,7 +1036,7 @@
         }
         else if (expr_var_sp->m_parser_vars->m_lldb_sym)
         {
-            const Address sym_address = expr_var_sp->m_parser_vars->m_lldb_sym->GetAddressRangeRef().GetBaseAddress();
+            const Address sym_address = expr_var_sp->m_parser_vars->m_lldb_sym->GetAddress();
             
             if (!sym_address.IsValid())
                 return Value();
@@ -3008,8 +3008,7 @@
     
     std::auto_ptr<Value> symbol_location(new Value);
     
-    AddressRange &symbol_range = symbol.GetAddressRangeRef();
-    Address &symbol_address = symbol_range.GetBaseAddress();
+    Address &symbol_address = symbol.GetAddress();
     lldb::addr_t symbol_load_addr = symbol_address.GetLoadAddress(target);
     
     symbol_location->SetContext(Value::eContextTypeClangType, user_type.GetOpaqueQualType());
@@ -3196,8 +3195,7 @@
     }
     else if (symbol)
     {
-        fun_address = &symbol->GetAddressRangeRef().GetBaseAddress();
-        
+        fun_address = &symbol->GetAddress();
         fun_decl = context.AddGenericFunDecl();
     }
     else