[all-commits] [llvm/llvm-project] 5abf76: ADT: Add assertions to SmallVector::insert, etc., ...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Wed Nov 18 17:36:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5abf76fbe37380874a88cc9aa02164800e4e10f3
      https://github.com/llvm/llvm-project/commit/5abf76fbe37380874a88cc9aa02164800e4e10f3
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-11-18 (Wed, 18 Nov 2020)

  Changed paths:
    M llvm/include/llvm/ADT/SmallVector.h
    M llvm/lib/MC/MCParser/MasmParser.cpp
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
    M llvm/unittests/ADT/SmallVectorTest.cpp
    M llvm/utils/TableGen/CodeGenSchedule.cpp

  Log Message:
  -----------
  ADT: Add assertions to SmallVector::insert, etc., for reference invalidation

2c196bbc6bd897b3dcc1d87a3baac28e1e88df41 asserted that
`SmallVector::push_back` doesn't invalidate the parameter when it needs
to grow. Do the same for `resize`, `append`, `assign`, `insert`, and
`emplace_back`.

Differential Revision: https://reviews.llvm.org/D91744




More information about the All-commits mailing list