[llvm] [Support] Fix unused variable warning in `reserveExtraSpace`; NFC (PR #106327)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 19:43:32 PDT 2024
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/106327
None
>From 22a4d94bae6f956396541faf125ca18c90b1c27f Mon Sep 17 00:00:00 2001
From: Noah Goldstein <goldstein.w.n at gmail.com>
Date: Tue, 27 Aug 2024 19:42:41 -0700
Subject: [PATCH] [Support] Fix unused variable warning in `reserveExtraSpace`;
NFC
---
llvm/include/llvm/Support/raw_ostream.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
index df9ee2e5a78586..2570c826502e7c 100644
--- a/llvm/include/llvm/Support/raw_ostream.h
+++ b/llvm/include/llvm/Support/raw_ostream.h
@@ -157,7 +157,7 @@ class raw_ostream {
/// So that the stream could keep at least tell() + ExtraSize bytes
/// without re-allocations. reserveExtraSpace() does not change
/// the size/data of the stream.
- virtual void reserveExtraSpace(uint64_t ExtraSize) {}
+ virtual void reserveExtraSpace(uint64_t ExtraSize) { (void)ExtraSize; }
/// Set the stream to be buffered, with an automatically determined buffer
/// size.
More information about the llvm-commits
mailing list