diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/tools/lldb-mi/MIDriverBase.cpp | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.bz2 |
*** 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/MIDriverBase.cpp')
-rw-r--r-- | lldb/tools/lldb-mi/MIDriverBase.cpp | 155 |
1 files changed, 77 insertions, 78 deletions
diff --git a/lldb/tools/lldb-mi/MIDriverBase.cpp b/lldb/tools/lldb-mi/MIDriverBase.cpp index 6738497..0620b61 100644 --- a/lldb/tools/lldb-mi/MIDriverBase.cpp +++ b/lldb/tools/lldb-mi/MIDriverBase.cpp @@ -8,13 +8,14 @@ //===----------------------------------------------------------------------===// // Third party headers: -#include "lldb/API/SBEvent.h" #include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBEvent.h" // In-house headers: #include "MIDriverBase.h" -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMIDriverBase constructor. // Type: Method. // Args: None. @@ -22,26 +23,22 @@ // Throws: None. //-- CMIDriverBase::CMIDriverBase() - : m_pDriverFallThru(nullptr) - , m_pDriverParent(nullptr) - , m_bExitApp(false) -{ -} + : m_pDriverFallThru(nullptr), m_pDriverParent(nullptr), m_bExitApp(false) {} -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMIDriverBase destructor. // Type: Overrideable. // Args: None. // Return: None. // Throws: None. //-- -CMIDriverBase::~CMIDriverBase() -{ - m_pDriverFallThru = NULL; -} +CMIDriverBase::~CMIDriverBase() { m_pDriverFallThru = NULL; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call on another driver to perform work +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call on another driver to +// perform work // should this driver not be able to handle the client data input. // Type: Overrideable. // Check the error message if the function returns a failure. @@ -52,15 +49,16 @@ CMIDriverBase::~CMIDriverBase() // MIstatus::failure - Command failed. // Throws: None. //-- -bool -CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilString &vwErrMsg) -{ - // Do nothing - override and implement. Use m_pDriverFallThru. - return MIstatus::success; +bool CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, + CMIUtilString &vwErrMsg) { + // Do nothing - override and implement. Use m_pDriverFallThru. + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call on another driver to perform work +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call on another driver to +// perform work // should this driver not be able to handle the client data input. // Type: Overrideable. // Args: vrOtherDriver - (R) Reference to another driver object. @@ -68,18 +66,18 @@ CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilStrin // MIstatus::failure - Functional failed. // Throws: None. //-- -bool -CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) -{ - MIunused(vrOtherDriver); +bool CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) { + MIunused(vrOtherDriver); - // Do nothing - override and implement. Set m_pDriverFallThru. + // Do nothing - override and implement. Set m_pDriverFallThru. - return MIstatus::success; + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call functionality on the parent driver +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call functionality on the +// parent driver // ask for information for example. // Type: Overrideable. // Args: vrOtherDriver - (R) Reference to another driver object. @@ -87,18 +85,18 @@ CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) // MIstatus::failure - Functional failed. // Throws: None. //-- -bool -CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) -{ - MIunused(vrOtherDriver); +bool CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) { + MIunused(vrOtherDriver); - // Do nothing - override and implement. Set m_pDriverParent. + // Do nothing - override and implement. Set m_pDriverParent. - return MIstatus::success; + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: Retrieve the parent driver to *this driver if one assigned. If assigned *this +//++ +//------------------------------------------------------------------------------------ +// Details: Retrieve the parent driver to *this driver if one assigned. If +// assigned *this // is the pass through driver that the parent driver passes work to. // Type: Method. // Args: None. @@ -106,14 +104,14 @@ CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) // - NULL = there is not parent to *this driver. // Throws: None. //-- -CMIDriverBase * -CMIDriverBase::GetDriversParent() const -{ - return m_pDriverParent; +CMIDriverBase *CMIDriverBase::GetDriversParent() const { + return m_pDriverParent; } -//++ ------------------------------------------------------------------------------------ -// Details: Retrieve the pointer to the other fall through driver *this driver is using +//++ +//------------------------------------------------------------------------------------ +// Details: Retrieve the pointer to the other fall through driver *this driver +// is using // (or not using). // Type: Method. // Args: None. @@ -121,72 +119,73 @@ CMIDriverBase::GetDriversParent() const // - NULL if no driver set. // Throws: None. //-- -CMIDriverBase * -CMIDriverBase::GetDriverToFallThruTo() const -{ - return m_pDriverFallThru; +CMIDriverBase *CMIDriverBase::GetDriverToFallThruTo() const { + return m_pDriverFallThru; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a file stream to other drivers on which *this driver -// write's out to and they read as expected input. *this driver is passing +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a file stream to other drivers on which *this +// driver +// write's out to and they read as expected input. *this driver is +// passing // through commands to the (child) pass through assigned driver. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStdin() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStdin() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a file stream to other pass through assigned drivers +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a file stream to other pass through assigned +// drivers // so they know what to write to. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStdout() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStdout() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a error file stream to other pass through assigned drivers +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a error file stream to other pass through +// assigned drivers // so they know what to write to. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStderr() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStderr() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: Set the MI Driver's exit application flag. The application checks this flag +//++ +//------------------------------------------------------------------------------------ +// Details: Set the MI Driver's exit application flag. The application checks +// this flag // after every stdin line is read so the exit may not be instantaneous. -// If vbForceExit is false the MI Driver queries its state and determines if is +// If vbForceExit is false the MI Driver queries its state and +// determines if is // should exit or continue operating depending on that running state. // Type: Overrideable. -// Args: vbForceExit - (R) True = Do not query, set state to exit, false = query if can/should exit right now. +// Args: vbForceExit - (R) True = Do not query, set state to exit, false = +// query if can/should exit right now. // Return: None. // Throws: None. //-- -void -CMIDriverBase::SetExitApplicationFlag(const bool vbForceExit) -{ - MIunused(vbForceExit); +void CMIDriverBase::SetExitApplicationFlag(const bool vbForceExit) { + MIunused(vbForceExit); - // Do nothing - override and implement + // Do nothing - override and implement } |