[all-commits] [llvm/llvm-project] fa35c1: ValueMapper: Rename RF_MoveDistinctMDs => RF_Reuse...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Wed Feb 10 16:54:57 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fa35c1f80f0ea080a7cbc581416929b0a654f25c
      https://github.com/llvm/llvm-project/commit/fa35c1f80f0ea080a7cbc581416929b0a654f25c
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-02-10 (Wed, 10 Feb 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/ValueMapper.h
    M llvm/lib/IR/LLVMContextImpl.h
    M llvm/lib/Linker/IRMover.cpp
    M llvm/lib/Transforms/Utils/CloneModule.cpp
    M llvm/lib/Transforms/Utils/ValueMapper.cpp
    M llvm/unittests/Transforms/Utils/ValueMapperTest.cpp

  Log Message:
  -----------
  ValueMapper: Rename RF_MoveDistinctMDs => RF_ReuseAndMutateDistinctMDs, NFC

Rename the `RF_MoveDistinctMDs` flag passed into `MapValue` and
`MapMetadata` to `RF_ReuseAndMutateDistinctMDs` in order to more
precisely describe its effect and clarify the header documentation.

Found this while helping to investigate PR48841, which pointed out an
unsound use of the flag in `CloneModule()`. For now I've just added a
FIXME there, but I'm hopeful that the new (more precise) name will
prevent other similar errors.




More information about the All-commits mailing list