[nfc]Make InstrProfSymtab non-copyable and non-movable (#86882)
commit2c7610cc43cd70192a0ed5eac58471c50045c6de
authorMingming Liu <mingmingl@google.com>
Thu, 28 Mar 2024 03:40:01 +0000 (27 20:40 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2024 03:40:01 +0000 (27 20:40 -0700)
tree02d21640b68a41bae8d2b99240992001c379374b
parent070d7af0c56b993806fa47f77b607b1849a2172f
[nfc]Make InstrProfSymtab non-copyable and non-movable (#86882)

- The direct use case (in [1]) is to add `llvm::IntervalMap` [2]  and the allocator required by IntervalMap ctor [3]
   to class `InstrProfSymtab` as owned members. The allocator class doesn't have a move-assignment operator;
   and it's going to take much effort to implement move-assignment operator for the allocator class such that the
   enclosing class is movable.
- There is only one use of compiler-generated move-assignment operator in the repo, which is in
   CoverageMappingReader.cpp. Luckily it's possible to use std::unique_ptr<InstrProfSymtab> instead, so did the change.

[1] https://github.com/llvm/llvm-project/pull/66825
[2] https://github.com/llvm/llvm-project/blob/4c2f68840e984b0f111779c46845ac00e3a7547d/llvm/include/llvm/ADT/IntervalMap.h#L936
[3] https://github.com/llvm/llvm-project/blob/4c2f68840e984b0f111779c46845ac00e3a7547d/llvm/include/llvm/ADT/IntervalMap.h#L1041
llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
llvm/include/llvm/ProfileData/InstrProf.h
llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp