Skip to content

Commit 44aa4d7

Browse files
[dsymutil] Use StringRef::consume_front (NFC)
1 parent 001fb1f commit 44aa4d7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/tools/dsymutil/SymbolMap.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ StringRef SymbolMapTranslator::operator()(StringRef Input) {
2626
if (!Input.starts_with("__hidden#") && !Input.starts_with("___hidden#"))
2727
return Input;
2828

29-
bool MightNeedUnderscore = false;
3029
StringRef Line = Input.drop_front(sizeof("__hidden#") - 1);
31-
if (Line[0] == '#') {
32-
Line = Line.drop_front();
33-
MightNeedUnderscore = true;
34-
}
30+
bool MightNeedUnderscore = Line.consume_front("#");
3531

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

0 commit comments

Comments
 (0)