erichkeane created this revision. erichkeane added reviewers: jyknight, jfb, hubert.reinterpretcast. Herald added a subscriber: dexonsmith. erichkeane requested review of this revision. Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
This got me pretty recently... TrailingObjects cannot be copied or moved, since they need to be pre-allocated. This patch deletes the copy and move operations (plus re-adds the default ctor). https://reviews.llvm.org/D97324 Files: llvm/include/llvm/Support/TrailingObjects.h Index: llvm/include/llvm/Support/TrailingObjects.h =================================================================== --- llvm/include/llvm/Support/TrailingObjects.h +++ llvm/include/llvm/Support/TrailingObjects.h @@ -345,6 +345,12 @@ return sizeof(BaseTy) + ParentType::additionalSizeToAllocImpl(0, Counts...); } + TrailingObjects() = default; + TrailingObjects(const TrailingObjects &) = delete; + TrailingObjects(TrailingObjects &&) = delete; + TrailingObjects &operator=(const TrailingObjects &) = delete; + TrailingObjects &operator=(TrailingObjects &&) = delete; + /// A type where its ::with_counts template member has a ::type member /// suitable for use as uninitialized storage for an object with the given /// trailing object counts. The template arguments are similar to those
Index: llvm/include/llvm/Support/TrailingObjects.h =================================================================== --- llvm/include/llvm/Support/TrailingObjects.h +++ llvm/include/llvm/Support/TrailingObjects.h @@ -345,6 +345,12 @@ return sizeof(BaseTy) + ParentType::additionalSizeToAllocImpl(0, Counts...); } + TrailingObjects() = default; + TrailingObjects(const TrailingObjects &) = delete; + TrailingObjects(TrailingObjects &&) = delete; + TrailingObjects &operator=(const TrailingObjects &) = delete; + TrailingObjects &operator=(TrailingObjects &&) = delete; + /// A type where its ::with_counts template member has a ::type member /// suitable for use as uninitialized storage for an object with the given /// trailing object counts. The template arguments are similar to those
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits