aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorShilei Tian <tianshilei1992@gmail.com>2021-01-09 13:00:50 -0500
committerShilei Tian <tianshilei1992@gmail.com>2021-01-09 13:01:01 -0500
commit175c336a1c5a7d4cf2e24ec5188c370cd6093ddb (patch)
treecc01be87aa5f0e021731f0b896e09a8ed51225a9 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parente98b441a09fac0a8419fee15afc725758390ca2a (diff)
downloadllvm-175c336a1c5a7d4cf2e24ec5188c370cd6093ddb.zip
llvm-175c336a1c5a7d4cf2e24ec5188c370cd6093ddb.tar.gz
llvm-175c336a1c5a7d4cf2e24ec5188c370cd6093ddb.tar.bz2
[OpenMP] Remove copy constructor of `RTLInfoTy`
Multiple `RTLInfoTy` objects are stored in a list `AllRTLs`. Since `RTLInfoTy` contains a `std::mutex`, it is by default not a copyable object. In order to support `AllRTLs.push_back(...)` which is currently used, a customized copy constructor is provided. Every time we need to add a new data member into `RTLInfoTy`, we should keep in mind not forgetting to add corresponding assignment in the copy constructor. In fact, the only use of the copy constructor is to push the object into the list, we can of course write it in a way that first emplace a new object back, and then use the reference to the last element. In this way we don't need the copy constructor anymore. If the element is invalid, we just need to pop it, and that's what this patch does. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D94361
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions