summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch')
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch
new file mode 100644
index 000000000000..a0d3c1df6d99
--- /dev/null
+++ b/sys-devel/llvm-roc/files/llvm-roc-3.7.0-current_pos.patch
@@ -0,0 +1,32 @@
+https://bugs.llvm.org/show_bug.cgi?id=43235
+
+diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
+index 705f1790b1d..a0314b2c46a 100644
+--- a/include/llvm/Support/raw_ostream.h
++++ b/include/llvm/Support/raw_ostream.h
+@@ -507,9 +507,7 @@ class raw_string_ostream : public raw_ostream {
+ /// See raw_ostream::write_impl.
+ void write_impl(const char *Ptr, size_t Size) override;
+
+- /// Return the current position within the stream, not counting the bytes
+- /// currently in the buffer.
+- uint64_t current_pos() const override { return OS.size(); }
++ uint64_t current_pos() const override;
+
+ public:
+ explicit raw_string_ostream(std::string &O) : OS(O) {}
+diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
+index 4bb315f824a..742e2aced39 100644
+--- a/lib/Support/raw_ostream.cpp
++++ b/lib/Support/raw_ostream.cpp
+@@ -895,6 +895,10 @@ raw_ostream &llvm::nulls() {
+ // raw_string_ostream
+ //===----------------------------------------------------------------------===//
+
++/// Return the current position within the stream, not counting the bytes
++/// currently in the buffer.
++uint64_t raw_string_ostream::current_pos() const { return OS.size(); }
++
+ raw_string_ostream::~raw_string_ostream() {
+ flush();
+ }