Files
allwpilib/upstream_utils/llvm_patches/0031-raw_ostream-Add-SetNumBytesInBuffer.patch
2024-12-24 17:40:31 -08:00

26 lines
975 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Johnson <johnson.peter@gmail.com>
Date: Sun, 29 Oct 2023 23:00:08 -0700
Subject: [PATCH 31/37] raw_ostream: Add SetNumBytesInBuffer
---
llvm/include/llvm/Support/raw_ostream.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
index 9bb9260eecf35b0f71d144256fc956a80b2da8a3..c5765a05fb493c6a5bb6b619f0fbdb8d986e21ed 100644
--- a/llvm/include/llvm/Support/raw_ostream.h
+++ b/llvm/include/llvm/Support/raw_ostream.h
@@ -365,6 +365,11 @@ protected:
SetBufferAndMode(BufferStart, Size, BufferKind::ExternalBuffer);
}
+ /// Force-set the number of bytes in the raw_ostream buffer.
+ void SetNumBytesInBuffer(size_t Size) {
+ OutBufCur = OutBufStart + Size;
+ }
+
/// Return an efficient buffer size for the underlying output mechanism.
virtual size_t preferred_buffer_size() const;