aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-06 13:18:20 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-06 13:27:37 +0000
commitb65da9848b46a94c37886772609c6ef9901a9f3a (patch)
tree1844b4ad1b6a3f6696756164bf2f8a5e51201ff2 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent939fd6c37c52a12cb968215cb30d1accd360338c (diff)
downloadllvm-b65da9848b46a94c37886772609c6ef9901a9f3a.zip
llvm-b65da9848b46a94c37886772609c6ef9901a9f3a.tar.gz
llvm-b65da9848b46a94c37886772609c6ef9901a9f3a.tar.bz2
[AsmPrinter] Use StringRef::starts_with/ends_with instead of startswith/endswith. NFC.
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 06dcf0a..3a9d5fa 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -142,7 +142,7 @@ StringRef CodeViewDebug::getFullFilepath(const DIFile *File) {
// If this is a Unix-style path, just use it as is. Don't try to canonicalize
// it textually because one of the path components could be a symlink.
- if (Dir.startswith("/") || Filename.startswith("/")) {
+ if (Dir.starts_with("/") || Filename.starts_with("/")) {
if (llvm::sys::path::is_absolute(Filename, llvm::sys::path::Style::posix))
return Filename;
Filepath = std::string(Dir);
@@ -910,10 +910,10 @@ static std::string flattenCommandLine(ArrayRef<std::string> Args,
i++; // Skip this argument and next one.
continue;
}
- if (Arg.startswith("-object-file-name") || Arg == MainFilename)
+ if (Arg.starts_with("-object-file-name") || Arg == MainFilename)
continue;
// Skip fmessage-length for reproduciability.
- if (Arg.startswith("-fmessage-length"))
+ if (Arg.starts_with("-fmessage-length"))
continue;
if (PrintedOneArg)
OS << " ";
@@ -2583,7 +2583,7 @@ CodeViewDebug::lowerRecordFieldList(const DICompositeType *Ty) {
// Virtual function pointer member.
if ((Member->getFlags() & DINode::FlagArtificial) &&
- Member->getName().startswith("_vptr$")) {
+ Member->getName().starts_with("_vptr$")) {
VFPtrRecord VFPR(getTypeIndex(Member->getBaseType()));
ContinuationBuilder.writeMemberType(VFPR);
MemberCount++;