[all-commits] [llvm/llvm-project] 586ecd: [llvm] Use StringRef::{starts, ends}_with (NFC) (#7...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Mon Dec 11 21:01:49 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 586ecdf205aa8b3d162da6f955170a6736656615
      https://github.com/llvm/llvm-project/commit/586ecdf205aa8b3d162da6f955170a6736656615
  Author: Kazu Hirata <kazu at google.com>
  Date:   2023-12-11 (Mon, 11 Dec 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
    M llvm/include/llvm/CodeGen/IndirectThunks.h
    M llvm/include/llvm/CodeGen/MIRYamlMapping.h
    M llvm/include/llvm/MC/MCSectionCOFF.h
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/include/llvm/Passes/PassBuilder.h
    M llvm/include/llvm/ProfileData/SampleProf.h
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Analysis/LoopInfo.cpp
    M llvm/lib/Analysis/VFABIDemangling.cpp
    M llvm/lib/AsmParser/LLLexer.cpp
    M llvm/lib/BinaryFormat/Magic.cpp
    M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
    M llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp
    M llvm/lib/CodeGen/GlobalMerge.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/CodeGen/WinEHPrepare.cpp
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    M llvm/lib/DWARFLinkerParallel/DWARFLinkerCompileUnit.cpp
    M llvm/lib/DWARFLinkerParallel/SyntheticTypeNameBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/DebugInfoSupport.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp
    M llvm/lib/ExecutionEngine/Orc/Shared/ObjectFormats.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFAArch64.h
    M llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
    M llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
    M llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
    M llvm/lib/FileCheck/FileCheck.cpp
    M llvm/lib/FuzzMutate/FuzzerCLI.cpp
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/IR/DebugInfo.cpp
    M llvm/lib/IR/Function.cpp
    M llvm/lib/IR/Mangler.cpp
    M llvm/lib/IR/PassInstrumentation.cpp
    M llvm/lib/IR/Type.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/InterfaceStub/IFSHandler.cpp
    M llvm/lib/LTO/LTOModule.cpp
    M llvm/lib/Linker/IRMover.cpp
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCDwarf.cpp
    M llvm/lib/MC/MCParser/AsmLexer.cpp
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/MC/MCParser/COFFMasmParser.cpp
    M llvm/lib/MC/MCParser/ELFAsmParser.cpp
    M llvm/lib/MC/MCParser/MasmParser.cpp
    M llvm/lib/MC/StringTableBuilder.cpp
    M llvm/lib/MC/WasmObjectWriter.cpp
    M llvm/lib/MC/WinCOFFObjectWriter.cpp
    M llvm/lib/ObjCopy/COFF/COFFObjcopy.cpp
    M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
    M llvm/lib/ObjCopy/MachO/MachOObject.h
    M llvm/lib/ObjCopy/wasm/WasmObjcopy.cpp
    M llvm/lib/Object/Archive.cpp
    M llvm/lib/Object/COFFImportFile.cpp
    M llvm/lib/Object/COFFModuleDefinition.cpp
    M llvm/lib/Object/COFFObjectFile.cpp
    M llvm/lib/Object/MachOObjectFile.cpp
    M llvm/lib/Object/ModuleSymbolTable.cpp
    M llvm/lib/Object/RecordStreamer.cpp
    M llvm/lib/Object/WasmObjectFile.cpp
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/lib/ObjectYAML/ELFYAML.cpp
    M llvm/lib/Option/ArgList.cpp
    M llvm/lib/Option/OptTable.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/ProfileData/GCOV.cpp
    M llvm/lib/ProfileData/InstrProf.cpp
    M llvm/lib/ProfileData/InstrProfCorrelator.cpp
    M llvm/lib/ProfileData/InstrProfReader.cpp
    M llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
    M llvm/lib/ProfileData/SampleProfReader.cpp
    M llvm/lib/ProfileData/SymbolRemappingReader.cpp
    M llvm/lib/Remarks/YAMLRemarkParser.cpp
    M llvm/lib/Support/Unix/Path.inc
    M llvm/lib/Target/AArch64/AArch64GlobalsTagging.cpp
    M llvm/lib/Target/AArch64/AArch64SLSHardening.cpp
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
    M llvm/lib/Target/AMDGPU/R600OpenCLImageTypeLoweringPass.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
    M llvm/lib/Target/ARM/ARMSLSHardening.cpp
    M llvm/lib/Target/ARM/ARMTargetMachine.cpp
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
    M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
    M llvm/lib/Target/AVR/AVRAsmPrinter.cpp
    M llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
    M llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp
    M llvm/lib/Target/BPF/BPFPreserveDIType.cpp
    M llvm/lib/Target/BPF/BTFDebug.cpp
    M llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
    M llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
    M llvm/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp
    M llvm/lib/Target/Lanai/LanaiTargetObjectFile.cpp
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
    M llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
    M llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
    M llvm/lib/Target/Mips/MipsISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
    M llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
    M llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
    M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
    M llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
    M llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
    M llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
    M llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
    M llvm/lib/Target/X86/X86InsertPrefetch.cpp
    M llvm/lib/Target/X86/X86Subtarget.cpp
    M llvm/lib/Target/XCore/XCoreISelLowering.cpp
    M llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
    M llvm/lib/TargetParser/AArch64TargetParser.cpp
    M llvm/lib/TargetParser/ARMTargetParser.cpp
    M llvm/lib/TargetParser/ARMTargetParserCommon.cpp
    M llvm/lib/TargetParser/CSKYTargetParser.cpp
    M llvm/lib/TargetParser/Host.cpp
    M llvm/lib/TargetParser/Triple.cpp
    M llvm/lib/TextAPI/Symbol.cpp
    M llvm/lib/TextAPI/Target.cpp
    M llvm/lib/TextAPI/TextStub.cpp
    M llvm/tools/dsymutil/BinaryHolder.cpp
    M llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
    M llvm/tools/dsymutil/MachODebugMapParser.cpp
    M llvm/tools/dsymutil/MachOUtils.cpp
    M llvm/tools/dsymutil/SymbolMap.cpp
    M llvm/tools/llc/llc.cpp
    M llvm/tools/lli/lli.cpp
    M llvm/tools/llvm-ar/llvm-ar.cpp
    M llvm/tools/llvm-as/llvm-as.cpp
    M llvm/tools/llvm-config/llvm-config.cpp
    M llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
    M llvm/tools/llvm-diff/llvm-diff.cpp
    M llvm/tools/llvm-dis/llvm-dis.cpp
    M llvm/tools/llvm-dwarfutil/DebugInfoLinker.h
    M llvm/tools/llvm-exegesis/lib/X86/Target.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
    M llvm/tools/llvm-nm/llvm-nm.cpp
    M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
    M llvm/tools/llvm-objdump/COFFDump.cpp
    M llvm/tools/llvm-objdump/MachODump.cpp
    M llvm/tools/llvm-objdump/SourcePrinter.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-profdata/llvm-profdata.cpp
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-rc/ResourceScriptCppFilter.cpp
    M llvm/tools/llvm-rc/ResourceScriptToken.cpp
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp
    M llvm/tools/llvm-readobj/COFFDumper.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/tools/llvm-readobj/Win64EHDumper.cpp
    M llvm/tools/llvm-reduce/deltas/StripDebugInfo.cpp
    M llvm/tools/llvm-reduce/llvm-reduce.cpp
    M llvm/tools/llvm-stress/llvm-stress.cpp
    M llvm/tools/llvm-undname/llvm-undname.cpp
    M llvm/tools/obj2yaml/archive2yaml.cpp
    M llvm/tools/obj2yaml/elf2yaml.cpp
    M llvm/tools/obj2yaml/macho2yaml.cpp
    M llvm/tools/obj2yaml/wasm2yaml.cpp
    M llvm/tools/opt/opt.cpp
    M llvm/tools/yaml2obj/yaml2obj.cpp
    M llvm/utils/split-file/split-file.cpp
    M llvm/utils/yaml-bench/YAMLBench.cpp

  Log Message:
  -----------
  [llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.




More information about the All-commits mailing list