[libcxx-commits] [PATCH] D120901: [demangler] Make OutputBuffer non-copyable
Nathan Sidwell via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 4 04:43:55 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG64221645a824: [demangler] Make OutputBuffer non-copyable (authored by urnathan).
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120901/new/
https://reviews.llvm.org/D120901
Files:
libcxxabi/src/demangle/Utility.h
llvm/include/llvm/Demangle/Utility.h
Index: llvm/include/llvm/Demangle/Utility.h
===================================================================
--- llvm/include/llvm/Demangle/Utility.h
+++ llvm/include/llvm/Demangle/Utility.h
@@ -71,6 +71,10 @@
OutputBuffer(char *StartBuf, size_t Size)
: Buffer(StartBuf), CurrentPosition(0), BufferCapacity(Size) {}
OutputBuffer() = default;
+ // Non-copyable
+ OutputBuffer(const OutputBuffer &) = delete;
+ OutputBuffer &operator=(const OutputBuffer &) = delete;
+
void reset(char *Buffer_, size_t BufferCapacity_) {
CurrentPosition = 0;
Buffer = Buffer_;
@@ -97,7 +101,7 @@
return *this;
}
- OutputBuffer prepend(StringView R) {
+ OutputBuffer &prepend(StringView R) {
size_t Size = R.size();
grow(Size);
Index: libcxxabi/src/demangle/Utility.h
===================================================================
--- libcxxabi/src/demangle/Utility.h
+++ libcxxabi/src/demangle/Utility.h
@@ -71,6 +71,10 @@
OutputBuffer(char *StartBuf, size_t Size)
: Buffer(StartBuf), CurrentPosition(0), BufferCapacity(Size) {}
OutputBuffer() = default;
+ // Non-copyable
+ OutputBuffer(const OutputBuffer &) = delete;
+ OutputBuffer &operator=(const OutputBuffer &) = delete;
+
void reset(char *Buffer_, size_t BufferCapacity_) {
CurrentPosition = 0;
Buffer = Buffer_;
@@ -97,7 +101,7 @@
return *this;
}
- OutputBuffer prepend(StringView R) {
+ OutputBuffer &prepend(StringView R) {
size_t Size = R.size();
grow(Size);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120901.412983.patch
Type: text/x-patch
Size: 1516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220304/4200f089/attachment.bin>
More information about the libcxx-commits
mailing list