diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-09-21 05:32:41 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-09-21 05:32:41 +0000 |
commit | 0013be16fff27ce7744210007e08ed7528212c65 (patch) | |
tree | 623d42291b99ad1b5a7972fca60ec30e7b6d235d /llvm/lib/DebugInfo | |
parent | 18929c50694220481b53784dad9e7a5a7aaec919 (diff) | |
download | bcm5719-llvm-0013be16fff27ce7744210007e08ed7528212c65.tar.gz bcm5719-llvm-0013be16fff27ce7744210007e08ed7528212c65.zip |
Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type extra times. NFC
llvm-svn: 248140
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp index 53a676efaf3..d22e63502d2 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp @@ -110,7 +110,7 @@ static const DWARFFormValue::FormClass DWARF4FormClasses[] = { bool DWARFFormValue::isFormClass(DWARFFormValue::FormClass FC) const { // First, check DWARF4 form classes. - if (Form < ArrayRef<FormClass>(DWARF4FormClasses).size() && + if (Form < makeArrayRef(DWARF4FormClasses).size() && DWARF4FormClasses[Form] == FC) return true; // Check more forms from DWARF4 and DWARF5 proposals. @@ -584,6 +584,6 @@ Optional<int64_t> DWARFFormValue::getAsSignedConstant() const { Optional<ArrayRef<uint8_t>> DWARFFormValue::getAsBlock() const { if (!isFormClass(FC_Block) && !isFormClass(FC_Exprloc)) return None; - return ArrayRef<uint8_t>(Value.data, Value.uval); + return makeArrayRef(Value.data, Value.uval); } |