Enable debug buffering.
authorDavid Greene <greened@obbligato.org>
Tue, 5 Jan 2010 01:30:32 +0000 (01:30 +0000)
committerDavid Greene <greened@obbligato.org>
Tue, 5 Jan 2010 01:30:32 +0000 (01:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92667 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 50a2e390ce6e3084b01edffca5fe28ef333cee0f..a636bd9b04f41406e14f9ef1cedf451e93d6f966 100644 (file)
@@ -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 @@ int main(int argc, char **argv) {
   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();