[llvm] r234504 - Misc cleanup. NFC.

Rafael Espindola rafael.espindola at gmail.com
Thu Apr 9 09:59:08 PDT 2015


Author: rafael
Date: Thu Apr  9 11:59:07 2015
New Revision: 234504

URL: http://llvm.org/viewvc/llvm-project?rev=234504&view=rev
Log:
Misc cleanup. NFC.

These were lost when I reverted the raw_ostream changes.

Modified:
    llvm/trunk/lib/Support/Debug.cpp
    llvm/trunk/lib/Support/raw_ostream.cpp

Modified: llvm/trunk/lib/Support/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Debug.cpp?rev=234504&r1=234503&r2=234504&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Debug.cpp (original)
+++ llvm/trunk/lib/Support/Debug.cpp Thu Apr  9 11:59:07 2015
@@ -114,9 +114,9 @@ static void debug_user_sig_handler(void
   // know that debug mode is enabled and dbgs() really is a
   // circular_raw_ostream.  If NDEBUG is defined, then dbgs() ==
   // errs() but this will never be invoked.
-  llvm::circular_raw_ostream *dbgout =
-    static_cast<llvm::circular_raw_ostream *>(&llvm::dbgs());
-  dbgout->flushBufferWithBanner();
+  llvm::circular_raw_ostream &dbgout =
+      static_cast<circular_raw_ostream &>(llvm::dbgs());
+  dbgout.flushBufferWithBanner();
 }
 
 /// dbgs - Return a circular-buffered debug stream.

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=234504&r1=234503&r2=234504&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Apr  9 11:59:07 2015
@@ -516,11 +516,11 @@ raw_fd_ostream::raw_fd_ostream(StringRef
   ShouldClose = true;
 }
 
-/// raw_fd_ostream ctor - FD is the file descriptor that this writes to.  If
-/// ShouldClose is true, this closes the file when the stream is destroyed.
+/// FD is the file descriptor that this writes to.  If ShouldClose is true, this
+/// closes the file when the stream is destroyed.
 raw_fd_ostream::raw_fd_ostream(int fd, bool shouldClose, bool unbuffered)
-  : raw_ostream(unbuffered), FD(fd),
-    ShouldClose(shouldClose), Error(false), UseAtomicWrites(false) {
+    : raw_ostream(unbuffered), FD(fd), ShouldClose(shouldClose), Error(false),
+      UseAtomicWrites(false) {
 #ifdef O_BINARY
   // Setting STDOUT to binary mode is necessary in Win32
   // to avoid undesirable linefeed conversion.





More information about the llvm-commits mailing list