Misc cleanup. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 9 Apr 2015 16:59:07 +0000 (16:59 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 9 Apr 2015 16:59:07 +0000 (16:59 +0000)
These were lost when I reverted the raw_ostream changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234504 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Debug.cpp
lib/Support/raw_ostream.cpp

index a88b18e6c06c0aebfaafbc7f29a6a74cb56a455b..eb99242914c2537bc497b02d86ec1c73338379bc 100644 (file)
@@ -114,9 +114,9 @@ static void debug_user_sig_handler(void *Cookie) {
   // 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.
index 051e2dd252fa1eb2a49de21040e10b1638558257..37f7bc531b6e82ea5b63d5ce2a330a79ea7dec87 100644 (file)
@@ -516,11 +516,11 @@ raw_fd_ostream::raw_fd_ostream(StringRef Filename, std::error_code &EC,
   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.