Skip to content

Commit 1df4fb9

Browse files
[Support] Use StringRef::ltrim (NFC)
1 parent 771ab15 commit 1df4fb9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Support/StringRef.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,7 @@ bool StringRef::consumeInteger(unsigned Radix, APInt &Result) {
517517

518518
// Skip leading zeroes. This can be a significant improvement if
519519
// it means we don't need > 64 bits.
520-
while (!Str.empty() && Str.front() == '0')
521-
Str = Str.substr(1);
520+
Str = Str.ltrim('0');
522521

523522
// If it was nothing but zeroes....
524523
if (Str.empty()) {

0 commit comments

Comments
 (0)