Remove unused variables
Address the 'variable set but not used' warning from GCC. In some cases a few additional calls were removed where there should be no visible side effects of the calls (i.e. should not effect any cached state). llvm-svn: 210879
This commit is contained in:
parent
2cef13cf71
commit
3924d754e5
|
@ -2439,10 +2439,6 @@ SBTarget::SetSectionLoadAddress (lldb::SBSection section,
|
|||
else
|
||||
{
|
||||
ProcessSP process_sp (target_sp->GetProcessSP());
|
||||
uint32_t stop_id = 0;
|
||||
if (process_sp)
|
||||
stop_id = process_sp->GetStopID();
|
||||
|
||||
if (target_sp->SetSectionLoadAddress (section_sp, section_base_addr))
|
||||
{
|
||||
// Flush info in the process (stack frames, etc)
|
||||
|
@ -2475,10 +2471,6 @@ SBTarget::ClearSectionLoadAddress (lldb::SBSection section)
|
|||
else
|
||||
{
|
||||
ProcessSP process_sp (target_sp->GetProcessSP());
|
||||
uint32_t stop_id = 0;
|
||||
if (process_sp)
|
||||
stop_id = process_sp->GetStopID();
|
||||
|
||||
if (target_sp->SetSectionUnloaded (section.GetSP()))
|
||||
{
|
||||
// Flush info in the process (stack frames, etc)
|
||||
|
@ -2554,9 +2546,6 @@ SBTarget::ClearModuleLoadAddress (lldb::SBModule module)
|
|||
if (section_list)
|
||||
{
|
||||
ProcessSP process_sp (target_sp->GetProcessSP());
|
||||
uint32_t stop_id = 0;
|
||||
if (process_sp)
|
||||
stop_id = process_sp->GetStopID();
|
||||
|
||||
bool changed = false;
|
||||
const size_t num_sections = section_list->GetSize();
|
||||
|
|
|
@ -1502,16 +1502,7 @@ ClangExpressionDeclMap::GetVariableValue (VariableSP &var,
|
|||
|
||||
DWARFExpression &var_location_expr = var->LocationExpression();
|
||||
|
||||
lldb::addr_t loclist_base_load_addr = LLDB_INVALID_ADDRESS;
|
||||
|
||||
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
|
||||
|
||||
if (var_location_expr.IsLocationList())
|
||||
{
|
||||
SymbolContext var_sc;
|
||||
var->CalculateSymbolContext (&var_sc);
|
||||
loclist_base_load_addr = var_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (target);
|
||||
}
|
||||
Error err;
|
||||
|
||||
if (var->GetLocationIsConstantValueData())
|
||||
|
|
|
@ -1018,7 +1018,6 @@ ScriptInterpreterPython::ExecuteMultipleLines (const char *in_string, const Exec
|
|||
ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession | (options.GetSetLLDBGlobals() ? ScriptInterpreterPython::Locker::InitGlobals : 0),
|
||||
ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
|
||||
|
||||
bool success = false;
|
||||
PythonObject return_value;
|
||||
PythonObject &main_module = GetMainModule ();
|
||||
PythonDictionary globals (PyModule_GetDict(main_module.get()));
|
||||
|
@ -1052,8 +1051,6 @@ ScriptInterpreterPython::ExecuteMultipleLines (const char *in_string, const Exec
|
|||
//PythonInputReaderManager py_input(options.GetEnableIO() ? this : NULL);
|
||||
return_value.Reset(PyEval_EvalCode (compiled_code, globals.get(), locals.get()));
|
||||
}
|
||||
if (return_value)
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5181,7 +5181,7 @@ ObjectFileMachO::SaveCore (const lldb::ProcessSP &process_sp,
|
|||
if (make_core)
|
||||
{
|
||||
std::vector<segment_command_64> segment_load_commands;
|
||||
uint32_t range_info_idx = 0;
|
||||
// uint32_t range_info_idx = 0;
|
||||
MemoryRegionInfo range_info;
|
||||
Error range_error = process_sp->GetMemoryRegionInfo(0, range_info);
|
||||
if (range_error.Success())
|
||||
|
|
|
@ -2393,7 +2393,6 @@ GDBRemoteCommunicationClient::GetCurrentProcessInfo ()
|
|||
std::string triple;
|
||||
uint32_t pointer_byte_size = 0;
|
||||
StringExtractor extractor;
|
||||
ByteOrder byte_order = eByteOrderInvalid;
|
||||
uint32_t num_keys_decoded = 0;
|
||||
lldb::pid_t pid = LLDB_INVALID_PROCESS_ID;
|
||||
while (response.GetNameColonValue(name, value))
|
||||
|
@ -2422,15 +2421,10 @@ GDBRemoteCommunicationClient::GetCurrentProcessInfo ()
|
|||
}
|
||||
else if (name.compare("endian") == 0)
|
||||
{
|
||||
++num_keys_decoded;
|
||||
if (value.compare("little") == 0)
|
||||
byte_order = eByteOrderLittle;
|
||||
else if (value.compare("big") == 0)
|
||||
byte_order = eByteOrderBig;
|
||||
else if (value.compare("pdp") == 0)
|
||||
byte_order = eByteOrderPDP;
|
||||
else
|
||||
--num_keys_decoded;
|
||||
if (value.compare("little") == 0 ||
|
||||
value.compare("big") == 0 ||
|
||||
value.compare("pdp") == 0)
|
||||
++num_keys_decoded;
|
||||
}
|
||||
else if (name.compare("ptrsize") == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue