[llvm] 2f45a93 - [Support] `const`ify a method; NFC

George Burgess IV via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 25 21:52:21 PST 2020


Author: George Burgess IV
Date: 2020-01-25T21:48:04-08:00
New Revision: 2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf

URL: https://github.com/llvm/llvm-project/commit/2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf
DIFF: https://github.com/llvm/llvm-project/commit/2f45a93edfe4bc62c7b2c6f8ffb0d06d83bb28cf.diff

LOG: [Support] `const`ify a method; NFC

Pointed out by Stepan on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-January/138617.html

Added: 
    

Modified: 
    llvm/include/llvm/Support/raw_ostream.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
index c8770c337588..12a4ff2540ee 100644
--- a/llvm/include/llvm/Support/raw_ostream.h
+++ b/llvm/include/llvm/Support/raw_ostream.h
@@ -565,7 +565,7 @@ class raw_svector_ostream : public raw_pwrite_stream {
   void flush() = delete;
 
   /// Return a StringRef for the vector contents.
-  StringRef str() { return StringRef(OS.data(), OS.size()); }
+  StringRef str() const { return StringRef(OS.data(), OS.size()); }
 };
 
 /// A raw_ostream that discards all output.


        


More information about the llvm-commits mailing list