summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Utility')
-rw-r--r--lldb/source/Utility/ArchSpec.cpp10
-rw-r--r--lldb/source/Utility/Listener.cpp4
-rw-r--r--lldb/source/Utility/RegisterValue.cpp2
-rw-r--r--lldb/source/Utility/StructuredData.cpp2
4 files changed, 6 insertions, 12 deletions
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index be51921de50..752fb182d79 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -610,10 +610,8 @@ const char *ArchSpec::GetArchitectureName() const {
bool ArchSpec::IsMIPS() const {
const llvm::Triple::ArchType machine = GetMachine();
- if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
- machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el)
- return true;
- return false;
+ return machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
+ machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el;
}
std::string ArchSpec::GetTargetABI() const {
@@ -1096,9 +1094,7 @@ bool ArchSpec::IsEqualTo(const ArchSpec &rhs, bool exact_match) const {
const llvm::Triple::EnvironmentType rhs_triple_env =
rhs_triple.getEnvironment();
- if (!IsCompatibleEnvironment(lhs_triple_env, rhs_triple_env))
- return false;
- return true;
+ return IsCompatibleEnvironment(lhs_triple_env, rhs_triple_env);
}
return false;
}
diff --git a/lldb/source/Utility/Listener.cpp b/lldb/source/Utility/Listener.cpp
index eba93ebf405..a20859e53ee 100644
--- a/lldb/source/Utility/Listener.cpp
+++ b/lldb/source/Utility/Listener.cpp
@@ -251,9 +251,7 @@ public:
return false;
}
- if (m_event_type_mask == 0 || m_event_type_mask & event_sp->GetType())
- return true;
- return false;
+ return m_event_type_mask == 0 || m_event_type_mask & event_sp->GetType();
}
private:
diff --git a/lldb/source/Utility/RegisterValue.cpp b/lldb/source/Utility/RegisterValue.cpp
index f51a9641d70..0abe92ec02c 100644
--- a/lldb/source/Utility/RegisterValue.cpp
+++ b/lldb/source/Utility/RegisterValue.cpp
@@ -475,7 +475,7 @@ bool RegisterValue::SignExtend(uint32_t sign_bitpos) {
bool RegisterValue::CopyValue(const RegisterValue &rhs) {
if (this == &rhs)
- return rhs.m_type == eTypeInvalid ? false : true;
+ return rhs.m_type != eTypeInvalid;
m_type = rhs.m_type;
switch (m_type) {
diff --git a/lldb/source/Utility/StructuredData.cpp b/lldb/source/Utility/StructuredData.cpp
index 26a96d5972e..76a141af40b 100644
--- a/lldb/source/Utility/StructuredData.cpp
+++ b/lldb/source/Utility/StructuredData.cpp
@@ -226,7 +226,7 @@ void StructuredData::Float::Dump(Stream &s, bool pretty_print) const {
}
void StructuredData::Boolean::Dump(Stream &s, bool pretty_print) const {
- if (m_value == true)
+ if (m_value)
s.PutCString("true");
else
s.PutCString("false");
OpenPOWER on IntegriCloud