[llvm-commits] CVS: llvm/include/llvm/Support/GraphWriter.h

Reid Spencer reid at x10sys.com
Tue Aug 22 12:01:50 PDT 2006



Changes in directory llvm/include/llvm/Support:

GraphWriter.h updated: 1.27 -> 1.28
---
Log message:

Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.


---
Diffs of the changes:  (+6 -1)

 GraphWriter.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Support/GraphWriter.h
diff -u llvm/include/llvm/Support/GraphWriter.h:1.27 llvm/include/llvm/Support/GraphWriter.h:1.28
--- llvm/include/llvm/Support/GraphWriter.h:1.27	Tue Jun 27 11:49:46 2006
+++ llvm/include/llvm/Support/GraphWriter.h	Tue Aug 22 14:01:30 2006
@@ -244,7 +244,12 @@
 sys::Path WriteGraph(const GraphType &G,
                      const std::string& Name, 
                      const std::string& Title = "") {
-  sys::Path Filename = sys::Path::GetTemporaryDirectory();;  
+  std::string ErrMsg;
+  sys::Path Filename = sys::Path::GetTemporaryDirectory(&ErrMsg);
+  if (Filename.isEmpty()) {
+    std::cerr << "Error: " << ErrMsg << "\n";
+    return Filename;
+  }
   Filename.appendComponent(Name + ".dot");
   Filename.makeUnique();
   std::cerr << "Writing '" << Filename << "'... ";






More information about the llvm-commits mailing list