@@ -706,20 +706,18 @@ LineEntry SymbolContext::GetFunctionStartLineEntry() const {
706706 return LineEntry ();
707707}
708708
709- bool SymbolContext::GetAddressRangeFromHereToEndLine ( uint32_t end_line,
710- AddressRange &range ,
711- Status &error ) {
709+ llvm::Error
710+ SymbolContext::GetAddressRangeFromHereToEndLine ( uint32_t end_line ,
711+ AddressRange &range ) {
712712 if (!line_entry.IsValid ()) {
713- error = Status::FromErrorString (" Symbol context has no line table." );
714- return false ;
713+ return llvm::createStringError (" Symbol context has no line table." );
715714 }
716715
717716 range = line_entry.range ;
718717 if (line_entry.line > end_line) {
719- error = Status::FromErrorStringWithFormat (
718+ return llvm::createStringError (
720719 " end line option %d must be after the current line: %d" , end_line,
721720 line_entry.line );
722- return false ;
723721 }
724722
725723 uint32_t line_index = 0 ;
@@ -740,35 +738,32 @@ bool SymbolContext::GetAddressRangeFromHereToEndLine(uint32_t end_line,
740738 if (!found) {
741739 // Can't find the index of the SymbolContext's line entry in the
742740 // SymbolContext's CompUnit.
743- error = Status::FromErrorString (
741+ return llvm::createStringError (
744742 " Can't find the current line entry in the CompUnit - can't process "
745743 " the end-line option" );
746- return false ;
747744 }
748745
749746 line_index = comp_unit->FindLineEntry (line_index, end_line, nullptr , false ,
750747 &end_entry);
751748 if (line_index == UINT32_MAX) {
752- error = Status::FromErrorStringWithFormat (
749+ return llvm::createStringError (
753750 " could not find a line table entry corresponding "
754751 " to end line number %d" ,
755752 end_line);
756- return false ;
757753 }
758754
759755 Block *func_block = GetFunctionBlock ();
760756 if (func_block && func_block->GetRangeIndexContainingAddress (
761757 end_entry.range .GetBaseAddress ()) == UINT32_MAX) {
762- error = Status::FromErrorStringWithFormat (
758+ return llvm::createStringError (
763759 " end line number %d is not contained within the current function." ,
764760 end_line);
765- return false ;
766761 }
767762
768763 lldb::addr_t range_size = end_entry.range .GetBaseAddress ().GetFileAddress () -
769764 range.GetBaseAddress ().GetFileAddress ();
770765 range.SetByteSize (range_size);
771- return true ;
766+ return llvm::Error::success () ;
772767}
773768
774769const Symbol *SymbolContext::FindBestGlobalDataSymbol (ConstString name,
0 commit comments