summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmnBase.cpp
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/tools/lldb-mi/MICmnBase.cpp
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/tools/lldb-mi/MICmnBase.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmnBase.cpp108
1 files changed, 51 insertions, 57 deletions
diff --git a/lldb/tools/lldb-mi/MICmnBase.cpp b/lldb/tools/lldb-mi/MICmnBase.cpp
index 1240df7802d..52100e79c78 100644
--- a/lldb/tools/lldb-mi/MICmnBase.cpp
+++ b/lldb/tools/lldb-mi/MICmnBase.cpp
@@ -15,7 +15,8 @@
#include "MICmnLog.h"
#include "MICmnStreamStderr.h"
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmnBase constructor.
// Type: Method.
// Args: None.
@@ -23,102 +24,97 @@
// Throws: None.
//--
CMICmnBase::CMICmnBase()
- : m_strMILastErrorDescription(CMIUtilString())
- , m_bInitialized(false)
- , m_pLog(&CMICmnLog::Instance())
- , m_clientUsageRefCnt(0)
-{
-}
+ : m_strMILastErrorDescription(CMIUtilString()), m_bInitialized(false),
+ m_pLog(&CMICmnLog::Instance()), m_clientUsageRefCnt(0) {}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: CMICmnBase destructor.
// Type: Overrideable.
// Args: None.
// Return: None.
// Throws: None.
//--
-CMICmnBase::~CMICmnBase()
-{
- m_pLog = NULL;
-}
+CMICmnBase::~CMICmnBase() { m_pLog = NULL; }
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: Retrieve whether *this object has an error description set.
// Type: Method.
// Args: None.
// Return: bool - True = Yes already defined, false = empty description.
// Throws: None.
//--
-bool
-CMICmnBase::HaveErrorDescription() const
-{
- return m_strMILastErrorDescription.empty();
+bool CMICmnBase::HaveErrorDescription() const {
+ return m_strMILastErrorDescription.empty();
}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: Retrieve MI's last error condition.
// Type: Method.
// Args: None.
// Return: CMIUtilString & - Text description.
// Throws: None.
//--
-const CMIUtilString &
-CMICmnBase::GetErrorDescription() const
-{
- return m_strMILastErrorDescription;
+const CMIUtilString &CMICmnBase::GetErrorDescription() const {
+ return m_strMILastErrorDescription;
}
-//++ ------------------------------------------------------------------------------------
-// Details: Set MI's error condition description. This may be accessed by clients and
-// seen by users. Message is available to the client using the server and sent
+//++
+//------------------------------------------------------------------------------------
+// Details: Set MI's error condition description. This may be accessed by
+// clients and
+// seen by users. Message is available to the client using the server
+// and sent
// to the Logger.
// Type: Method.
// Args: vrTxt - (R) Text description.
// Return: None.
// Throws: None.
//--
-void
-CMICmnBase::SetErrorDescription(const CMIUtilString &vrTxt) const
-{
- m_strMILastErrorDescription = vrTxt;
- if (!vrTxt.empty())
- {
- const CMIUtilString txt(CMIUtilString::Format("Error: %s", vrTxt.c_str()));
- CMICmnStreamStderr::Instance().Write(txt);
- }
+void CMICmnBase::SetErrorDescription(const CMIUtilString &vrTxt) const {
+ m_strMILastErrorDescription = vrTxt;
+ if (!vrTxt.empty()) {
+ const CMIUtilString txt(CMIUtilString::Format("Error: %s", vrTxt.c_str()));
+ CMICmnStreamStderr::Instance().Write(txt);
+ }
}
-//++ ------------------------------------------------------------------------------------
-// Details: Set MI's error condition description. This may be accessed by clients and
-// seen by users. Message is available to the client using the server and sent
+//++
+//------------------------------------------------------------------------------------
+// Details: Set MI's error condition description. This may be accessed by
+// clients and
+// seen by users. Message is available to the client using the server
+// and sent
// to the Logger.
// Type: Method.
// Args: vrTxt - (R) Text description.
// Return: None.
// Throws: None.
//--
-void
-CMICmnBase::SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const
-{
- m_strMILastErrorDescription = vrTxt;
+void CMICmnBase::SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const {
+ m_strMILastErrorDescription = vrTxt;
}
-//++ ------------------------------------------------------------------------------------
+//++
+//------------------------------------------------------------------------------------
// Details: Clear MI's error condition description.
// Type: Method.
// Args: None.
// Return: None.
// Throws: None.
//--
-void
-CMICmnBase::ClrErrorDescription() const
-{
- m_strMILastErrorDescription.clear();
+void CMICmnBase::ClrErrorDescription() const {
+ m_strMILastErrorDescription.clear();
}
-//++ ------------------------------------------------------------------------------------
-// Details: Set MI's error condition description. This may be accessed by clients and
-// seen by users. Message is available to the client using the server and sent
+//++
+//------------------------------------------------------------------------------------
+// Details: Set MI's error condition description. This may be accessed by
+// clients and
+// seen by users. Message is available to the client using the server
+// and sent
// to the Logger.
// Type: Method.
// Args: vFormat - (R) Format string.
@@ -126,13 +122,11 @@ CMICmnBase::ClrErrorDescription() const
// Return: None.
// Throws: None.
//--
-void
-CMICmnBase::SetErrorDescriptionn(const CMIUtilString vFormat, ...) const
-{
- va_list args;
- va_start(args, vFormat);
- CMIUtilString strResult = CMIUtilString::FormatValist(vFormat, args);
- va_end(args);
+void CMICmnBase::SetErrorDescriptionn(const CMIUtilString vFormat, ...) const {
+ va_list args;
+ va_start(args, vFormat);
+ CMIUtilString strResult = CMIUtilString::FormatValist(vFormat, args);
+ va_end(args);
- SetErrorDescription(strResult);
+ SetErrorDescription(strResult);
}
OpenPOWER on IntegriCloud