diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 7d32ee66c2b..4bdfac298cc 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" @@ -373,7 +374,7 @@ void TimerGroup::removeTimer() { TimersToPrint.clear(); - if (OutStream != &errs() && OutStream != &outs()) + if (OutStream != &errs() && OutStream != &outs() && OutStream != &dbgs()) delete OutStream; // Close the file... } }