mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
26 lines
975 B
Diff
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 27/33] 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 f2df534b6bd7a37840fc0c3dba0f657b8b90812e..5289d11d630cc57deebff6647c684fa26a70a16a 100644
|
|
--- a/llvm/include/llvm/Support/raw_ostream.h
|
|
+++ b/llvm/include/llvm/Support/raw_ostream.h
|
|
@@ -366,6 +366,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;
|
|
|