summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2015-09-15 10:36:08 +0000
committerBruce Mitchener <bruce.mitchener@gmail.com>2015-09-15 10:36:08 +0000
commit3be88564e9a6543112046629a44fbf1bbbcdb2ed (patch)
treee5b3ee9ced5e461402dce9a411852247674e61ad
parent41b1f731221393a0b4279e4076c17950c3f93890 (diff)
downloadbcm5719-llvm-3be88564e9a6543112046629a44fbf1bbbcdb2ed.tar.gz
bcm5719-llvm-3be88564e9a6543112046629a44fbf1bbbcdb2ed.zip
[lldb-mi] Simplify CMICmnLLDBDebugSessionInfo::Shutdown.
Summary: * SharedDataDestroy couldn't fail, so no need to return a status. * No need for status, so can remove error message. The error message wasn't displayed or used anywhere anyway. Reviewers: abidh, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12879 llvm-svn: 247673
-rw-r--r--lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp18
-rw-r--r--lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h2
-rw-r--r--lldb/tools/lldb-mi/MICmnResources.cpp2
-rw-r--r--lldb/tools/lldb-mi/MICmnResources.h1
4 files changed, 5 insertions, 18 deletions
diff --git a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
index 2c950809450..ef99ac9a420 100644
--- a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
@@ -99,16 +99,9 @@ CMICmnLLDBDebugSessionInfo::Shutdown()
if (!m_bInitialized)
return MIstatus::success;
- bool bOk = MIstatus::success;
- CMIUtilString errMsg;
-
// Tidy up
- bOk = SharedDataDestroy();
- if (!bOk)
- {
- errMsg = MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE);
- errMsg += "\n";
- }
+ SharedDataDestroy();
+
m_vecActiveThreadId.clear();
CMICmnLLDBDebugSessionInfoVarObj::VarObjClear();
@@ -125,18 +118,15 @@ CMICmnLLDBDebugSessionInfo::Shutdown()
// stopped i.e. application shutdown.
// Type: Method.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnLLDBDebugSessionInfo::SharedDataDestroy()
{
m_mapIdToSessionData.Clear();
m_vecVarObj.clear();
m_mapBrkPtIdToBrkPtInfo.clear();
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
diff --git a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
index 420585a8ee0..dbad0c86159 100644
--- a/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
+++ b/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
@@ -143,7 +143,7 @@ class CMICmnLLDBDebugSessionInfo : public CMICmnBase, public MI::ISingleton<CMIC
// Variant type data which can be assigned and retrieved across all command instances
template <typename T> bool SharedDataAdd(const CMIUtilString &vKey, const T &vData);
template <typename T> bool SharedDataRetrieve(const CMIUtilString &vKey, T &vwData);
- bool SharedDataDestroy();
+ void SharedDataDestroy();
// Common command required functionality
bool AccessPath(const CMIUtilString &vPath, bool &vwbYesAccessible);
diff --git a/lldb/tools/lldb-mi/MICmnResources.cpp b/lldb/tools/lldb-mi/MICmnResources.cpp
index 93b33a5a4ee..50d6b795def 100644
--- a/lldb/tools/lldb-mi/MICmnResources.cpp
+++ b/lldb/tools/lldb-mi/MICmnResources.cpp
@@ -141,8 +141,6 @@ const CMICmnResources::SRsrcTextData CMICmnResources::ms_pResourceId2TextData[]
"LLDB Out-of-band. %s. Event handler tried to set new MI Driver running state and failed. %s"},
{IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
"LLDB Out-of-band. '%s'. Number of valid breakpoint exceeded %d. Cannot create new breakpoint with ID %d"},
- {IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE,
- "LLDB debug session info. Release some or all of the data shared across command instances failed"},
{IDS_DBGSESSION_ERR_SHARED_DATA_ADD, "LLDB debug session info. Failed to add '%s' data to the shared data command container"},
{IDS_MI_SHTDWN_ERR_LOG, "Log. Error occurred during shutdown. %s"},
{IDS_MI_SHUTDOWN_ERR, "Server shutdown failure. %s"},
diff --git a/lldb/tools/lldb-mi/MICmnResources.h b/lldb/tools/lldb-mi/MICmnResources.h
index 3e0a7c577d7..dc9c52c6df6 100644
--- a/lldb/tools/lldb-mi/MICmnResources.h
+++ b/lldb/tools/lldb-mi/MICmnResources.h
@@ -152,7 +152,6 @@ enum
IDS_LLDBOUTOFBAND_ERR_SETNEWDRIVERSTATE,
IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
- IDS_DBGSESSION_ERR_SHARED_DATA_RELEASE,
IDS_DBGSESSION_ERR_SHARED_DATA_ADD,
IDS_MI_SHTDWN_ERR_LOG,
OpenPOWER on IntegriCloud