[all-commits] [llvm/llvm-project] 33e7cd: [llvm] Prefer StringRef::substr to StringRef::slic...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Sun Aug 25 11:31:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 33e7cd6ff23f6c904314d17c68dc58168fd32d09
https://github.com/llvm/llvm-project/commit/33e7cd6ff23f6c904314d17c68dc58168fd32d09
Author: Kazu Hirata <kazu at google.com>
Date: 2024-08-25 (Sun, 25 Aug 2024)
Changed paths:
M llvm/include/llvm/ADT/StringRef.h
M llvm/lib/CodeGen/MIRParser/MIParser.cpp
M llvm/lib/MC/MCAsmStreamer.cpp
M llvm/lib/Object/MachOObjectFile.cpp
M llvm/lib/Support/StringRef.cpp
M llvm/lib/Support/VirtualFileSystem.cpp
M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
M llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
M llvm/lib/TargetParser/RISCVISAInfo.cpp
M llvm/utils/TableGen/AsmMatcherEmitter.cpp
M llvm/utils/TableGen/OptParserEmitter.cpp
Log Message:
-----------
[llvm] Prefer StringRef::substr to StringRef::slice (NFC) (#105943)
S.substr(N) is simpler than S.slice(N, StringRef::npos) and
S.slice(N, S.size()). Also, substr is probably better recognizable
than slice thanks to std::string_view::substr.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list