Skip to content

Commit

Permalink
[dsymutil] Use StringRef::consume_front (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 16, 2024
1 parent 001fb1f commit 44aa4d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions llvm/tools/dsymutil/SymbolMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ StringRef SymbolMapTranslator::operator()(StringRef Input) {
if (!Input.starts_with("__hidden#") && !Input.starts_with("___hidden#"))
return Input;

bool MightNeedUnderscore = false;
StringRef Line = Input.drop_front(sizeof("__hidden#") - 1);
if (Line[0] == '#') {
Line = Line.drop_front();
MightNeedUnderscore = true;
}
bool MightNeedUnderscore = Line.consume_front("#");

std::size_t LineNumber = std::numeric_limits<std::size_t>::max();
Line.split('_').first.getAsInteger(10, LineNumber);
Expand Down

0 comments on commit 44aa4d7

Please sign in to comment.