Fix PR6826: GraphWriter delete the generated file before "dotty" load it,
authorChris Lattner <sabre@nondot.org>
Tue, 13 Apr 2010 04:35:39 +0000 (04:35 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 13 Apr 2010 04:35:39 +0000 (04:35 +0000)
patch by 'ether'.

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

lib/Support/GraphWriter.cpp

index ec84f9beca06a1d0a7f12d528371f5db31231725..e300b1f36a5c67d539d2e2ae2cc3bebff9d14fa4 100644 (file)
@@ -166,7 +166,8 @@ void llvm::DisplayGraph(const sys::Path &Filename, bool wait,
      errs() << "Error viewing graph " << Filename.str() << ": "
             << ErrMsg << "\n";
   } else {
-#ifdef __MINGW32__ // Dotty spawns another app and doesn't wait until it returns
+// Dotty spawns another app and doesn't wait until it returns
+#if defined (__MINGW32__) || defined (_WINDOWS)
     return;
 #endif
     Filename.eraseFromDisk();