Skip to content

Commit a0b459d

Browse files
[IR] Use StringRef::consume_front (NFC)
1 parent 28f9041 commit a0b459d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/IR/GlobalValue.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,7 @@ class GlobalValue : public Constant {
564564
/// arbitrary GlobalValue, this is not the function you're looking for; see
565565
/// Mangler.h.
566566
static StringRef dropLLVMManglingEscape(StringRef Name) {
567-
if (!Name.empty() && Name[0] == '\1')
568-
return Name.substr(1);
567+
Name.consume_front("\1");
569568
return Name;
570569
}
571570

0 commit comments

Comments
 (0)