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/source/API/SBMemoryRegionInfo.cpp | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | bcm5719-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/source/API/SBMemoryRegionInfo.cpp')
-rw-r--r-- | lldb/source/API/SBMemoryRegionInfo.cpp | 127 |
1 files changed, 47 insertions, 80 deletions
diff --git a/lldb/source/API/SBMemoryRegionInfo.cpp b/lldb/source/API/SBMemoryRegionInfo.cpp index 1e4dd769644..3e7227650f7 100644 --- a/lldb/source/API/SBMemoryRegionInfo.cpp +++ b/lldb/source/API/SBMemoryRegionInfo.cpp @@ -7,9 +7,9 @@ // //===----------------------------------------------------------------------===// +#include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBDefines.h" #include "lldb/API/SBError.h" -#include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBStream.h" #include "lldb/Core/StreamString.h" #include "lldb/Target/MemoryRegionInfo.h" @@ -17,115 +17,82 @@ using namespace lldb; using namespace lldb_private; +SBMemoryRegionInfo::SBMemoryRegionInfo() + : m_opaque_ap(new MemoryRegionInfo()) {} -SBMemoryRegionInfo::SBMemoryRegionInfo () : - m_opaque_ap (new MemoryRegionInfo()) -{ +SBMemoryRegionInfo::SBMemoryRegionInfo(const MemoryRegionInfo *lldb_object_ptr) + : m_opaque_ap(new MemoryRegionInfo()) { + if (lldb_object_ptr) + ref() = *lldb_object_ptr; } -SBMemoryRegionInfo::SBMemoryRegionInfo (const MemoryRegionInfo *lldb_object_ptr) : - m_opaque_ap (new MemoryRegionInfo()) -{ - if (lldb_object_ptr) - ref() = *lldb_object_ptr; +SBMemoryRegionInfo::SBMemoryRegionInfo(const SBMemoryRegionInfo &rhs) + : m_opaque_ap(new MemoryRegionInfo()) { + ref() = rhs.ref(); } -SBMemoryRegionInfo::SBMemoryRegionInfo(const SBMemoryRegionInfo &rhs) : - m_opaque_ap (new MemoryRegionInfo()) -{ +const SBMemoryRegionInfo &SBMemoryRegionInfo:: +operator=(const SBMemoryRegionInfo &rhs) { + if (this != &rhs) { ref() = rhs.ref(); + } + return *this; } -const SBMemoryRegionInfo & -SBMemoryRegionInfo::operator = (const SBMemoryRegionInfo &rhs) -{ - if (this != &rhs) - { - ref() = rhs.ref(); - } - return *this; -} - -SBMemoryRegionInfo::~SBMemoryRegionInfo () -{ -} +SBMemoryRegionInfo::~SBMemoryRegionInfo() {} -void -SBMemoryRegionInfo::Clear() -{ - m_opaque_ap->Clear(); -} +void SBMemoryRegionInfo::Clear() { m_opaque_ap->Clear(); } -bool -SBMemoryRegionInfo::operator == (const SBMemoryRegionInfo &rhs) const -{ - return ref() == rhs.ref(); +bool SBMemoryRegionInfo::operator==(const SBMemoryRegionInfo &rhs) const { + return ref() == rhs.ref(); } -bool -SBMemoryRegionInfo::operator != (const SBMemoryRegionInfo &rhs) const -{ - return ref() != rhs.ref(); +bool SBMemoryRegionInfo::operator!=(const SBMemoryRegionInfo &rhs) const { + return ref() != rhs.ref(); } -MemoryRegionInfo & -SBMemoryRegionInfo::ref() -{ - return *m_opaque_ap; -} +MemoryRegionInfo &SBMemoryRegionInfo::ref() { return *m_opaque_ap; } -const MemoryRegionInfo & -SBMemoryRegionInfo::ref() const -{ - return *m_opaque_ap; -} +const MemoryRegionInfo &SBMemoryRegionInfo::ref() const { return *m_opaque_ap; } -lldb::addr_t -SBMemoryRegionInfo::GetRegionBase () { - return m_opaque_ap->GetRange().GetRangeBase(); +lldb::addr_t SBMemoryRegionInfo::GetRegionBase() { + return m_opaque_ap->GetRange().GetRangeBase(); } -lldb::addr_t -SBMemoryRegionInfo::GetRegionEnd () { - return m_opaque_ap->GetRange().GetRangeEnd(); +lldb::addr_t SBMemoryRegionInfo::GetRegionEnd() { + return m_opaque_ap->GetRange().GetRangeEnd(); } -bool -SBMemoryRegionInfo::IsReadable () { - return m_opaque_ap->GetReadable() == MemoryRegionInfo::eYes; +bool SBMemoryRegionInfo::IsReadable() { + return m_opaque_ap->GetReadable() == MemoryRegionInfo::eYes; } -bool -SBMemoryRegionInfo::IsWritable () { - return m_opaque_ap->GetWritable() == MemoryRegionInfo::eYes; +bool SBMemoryRegionInfo::IsWritable() { + return m_opaque_ap->GetWritable() == MemoryRegionInfo::eYes; } -bool -SBMemoryRegionInfo::IsExecutable () { - return m_opaque_ap->GetExecutable() == MemoryRegionInfo::eYes; +bool SBMemoryRegionInfo::IsExecutable() { + return m_opaque_ap->GetExecutable() == MemoryRegionInfo::eYes; } -bool -SBMemoryRegionInfo::IsMapped () { - return m_opaque_ap->GetMapped() == MemoryRegionInfo::eYes; +bool SBMemoryRegionInfo::IsMapped() { + return m_opaque_ap->GetMapped() == MemoryRegionInfo::eYes; } -const char * -SBMemoryRegionInfo::GetName () { - return m_opaque_ap->GetName().AsCString(); +const char *SBMemoryRegionInfo::GetName() { + return m_opaque_ap->GetName().AsCString(); } -bool -SBMemoryRegionInfo::GetDescription (SBStream &description) -{ - Stream &strm = description.ref(); - const addr_t load_addr = m_opaque_ap->GetRange().base; +bool SBMemoryRegionInfo::GetDescription(SBStream &description) { + Stream &strm = description.ref(); + const addr_t load_addr = m_opaque_ap->GetRange().base; - strm.Printf ("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 " ", load_addr, load_addr + m_opaque_ap->GetRange().size); - strm.Printf (m_opaque_ap->GetReadable() ? "R" : "-"); - strm.Printf (m_opaque_ap->GetWritable() ? "W" : "-"); - strm.Printf (m_opaque_ap->GetExecutable() ? "X" : "-"); - strm.Printf ("]"); + strm.Printf("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 " ", load_addr, + load_addr + m_opaque_ap->GetRange().size); + strm.Printf(m_opaque_ap->GetReadable() ? "R" : "-"); + strm.Printf(m_opaque_ap->GetWritable() ? "W" : "-"); + strm.Printf(m_opaque_ap->GetExecutable() ? "X" : "-"); + strm.Printf("]"); - return true; + return true; } |