Enable debug buffering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92667 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 50a2e39..a636bd9 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -26,6 +26,7 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/PassNameParser.h"
 #include "llvm/System/Signals.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/IRReader.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MemoryBuffer.h"
@@ -344,6 +345,9 @@
   sys::PrintStackTraceOnErrorSignal();
   llvm::PrettyStackTraceProgram X(argc, argv);
   
+  // Enable debug stream buffering.
+  EnableDebugBuffering = true;
+
   llvm_shutdown_obj Y;  // Call llvm_shutdown() on exit.
   LLVMContext &Context = getGlobalContext();