summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-05-25 13:28:03 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-05-25 13:28:03 +0000
commit68a29562f9a5a98941d31cef8ab83c007c91a84a (patch)
treeffee16591ec1528eba063197b28b083b7e7de024 /llvm/lib
parentf1452286764e89f5bc5aa6407e166bd949f98b1b (diff)
downloadbcm5719-llvm-68a29562f9a5a98941d31cef8ab83c007c91a84a.tar.gz
bcm5719-llvm-68a29562f9a5a98941d31cef8ab83c007c91a84a.zip
Refactor: Simplify boolean conditional return statements in llvm/lib/DebugInfo/DWARF
Use clang-tidy to simplify boolean conditional return statements. Patch by Richard Thomson <legalize@xmission.com>! Differential Revision: http://reviews.llvm.org/D9972 llvm-svn: 238132
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp6
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp5
2 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index 75ca7622139..53a676efaf3 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -127,10 +127,8 @@ bool DWARFFormValue::isFormClass(DWARFFormValue::FormClass FC) const {
// In DWARF3 DW_FORM_data4 and DW_FORM_data8 served also as a section offset.
// Don't check for DWARF version here, as some producers may still do this
// by mistake.
- if ((Form == DW_FORM_data4 || Form == DW_FORM_data8) &&
- FC == FC_SectionOffset)
- return true;
- return false;
+ return (Form == DW_FORM_data4 || Form == DW_FORM_data8) &&
+ FC == FC_SectionOffset;
}
bool DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index 63a99855551..348476d72b6 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -79,10 +79,7 @@ bool DWARFUnit::extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) {
return false;
Abbrevs = Abbrev->getAbbreviationDeclarationSet(AbbrOffset);
- if (Abbrevs == nullptr)
- return false;
-
- return true;
+ return Abbrevs != nullptr;
}
bool DWARFUnit::extract(DataExtractor debug_info, uint32_t *offset_ptr) {
OpenPOWER on IntegriCloud