[all-commits] [llvm/llvm-project] f9306f: [ADT] Rename llvm::erase_value to llvm::erase (NFC...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Oct 24 23:03:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9306f6de3bd19a2dcacd64566852a5f92c86e77
      https://github.com/llvm/llvm-project/commit/f9306f6de3bd19a2dcacd64566852a5f92c86e77
  Author: Kazu Hirata <kazu at google.com>
  Date:   2023-10-24 (Tue, 24 Oct 2023)

  Changed paths:
    M bolt/lib/Passes/HFSortPlus.cpp
    M bolt/lib/Passes/IndirectCallPromotion.cpp
    M clang-tools-extra/clangd/FindTarget.cpp
    M clang-tools-extra/clangd/SystemIncludeExtractor.cpp
    M clang/include/clang/Analysis/Analyses/Dominators.h
    M clang/include/clang/Basic/JsonSupport.h
    M clang/include/clang/Sema/ScopeInfo.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M llvm/include/llvm/ADT/STLExtras.h
    M llvm/include/llvm/Analysis/IntervalIterator.h
    M llvm/include/llvm/Support/CFGDiff.h
    M llvm/include/llvm/Support/GenericDomTreeConstruction.h
    M llvm/include/llvm/TableGen/DirectiveEmitter.h
    M llvm/lib/Analysis/AssumptionCache.cpp
    M llvm/lib/Analysis/LoopPass.cpp
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/LiveIntervals.cpp
    M llvm/lib/CodeGen/MachineBlockPlacement.cpp
    M llvm/lib/CodeGen/MachinePipeliner.cpp
    M llvm/lib/CodeGen/MachineRegisterInfo.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
    M llvm/lib/CodeGen/WinEHPrepare.cpp
    M llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp
    M llvm/lib/TableGen/TGParser.cpp
    M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
    M llvm/lib/Transforms/Utils/CodeLayout.cpp
    M llvm/lib/Transforms/Utils/LoopUnroll.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VPlanValue.h
    M llvm/tools/llvm-dwarfdump/Statistics.cpp
    M llvm/tools/llvm-yaml-numeric-parser-fuzzer/yaml-numeric-parser-fuzzer.cpp
    M llvm/tools/llvm-yaml-parser-fuzzer/yaml-parser-fuzzer.cpp
    M mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/lib/Reducer/ReductionNode.cpp
    M mlir/lib/TableGen/Dialect.cpp
    M polly/lib/Analysis/ScopInfo.cpp

  Log Message:
  -----------
  [ADT] Rename llvm::erase_value to llvm::erase (NFC) (#70156)

C++20 comes with std::erase to erase a value from std::vector.  This
patch renames llvm::erase_value to llvm::erase for consistency with
C++20.

We could make llvm::erase more similar to std::erase by having it
return the number of elements removed, but I'm not doing that for now
because nobody seems to care about that in our code base.

Since there are only 50 occurrences of erase_value in our code base,
this patch replaces all of them with llvm::erase and deprecates
llvm::erase_value.




More information about the All-commits mailing list