[all-commits] [llvm/llvm-project] 2c7610: [nfc]Make InstrProfSymtab non-copyable and non-mov...
Mingming Liu via All-commits
all-commits at lists.llvm.org
Wed Mar 27 20:40:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2c7610cc43cd70192a0ed5eac58471c50045c6de
https://github.com/llvm/llvm-project/commit/2c7610cc43cd70192a0ed5eac58471c50045c6de
Author: Mingming Liu <mingmingl at google.com>
Date: 2024-03-27 (Wed, 27 Mar 2024)
Changed paths:
M llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
M llvm/include/llvm/ProfileData/InstrProf.h
M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list