#ifndef LLVM_SUPPORT_GRAPHWRITER_H
#define LLVM_SUPPORT_GRAPHWRITER_H
+#include "llvm/Support/Debug.h"
#include "llvm/Support/DOTGraphTraits.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/System/Path.h"
-#include <vector>
-#include <iostream>
#include <fstream>
+#include <vector>
namespace llvm {
std::string ErrMsg;
sys::Path Filename = sys::Path::GetTemporaryDirectory(&ErrMsg);
if (Filename.isEmpty()) {
- std::cerr << "Error: " << ErrMsg << "\n";
+ cerr << "Error: " << ErrMsg << "\n";
return Filename;
}
Filename.appendComponent(Name + ".dot");
if (Filename.makeUnique(true,&ErrMsg)) {
- std::cerr << "Error: " << ErrMsg << "\n";
+ cerr << "Error: " << ErrMsg << "\n";
return sys::Path();
}
- std::cerr << "Writing '" << Filename << "'... ";
+ cerr << "Writing '" << Filename << "'... ";
std::ofstream O(Filename.c_str());
// Output the end of the graph
W.writeFooter();
- std::cerr << " done. \n";
+ cerr << " done. \n";
O.close();
} else {
- std::cerr << "error opening file for writing!\n";
+ cerr << "error opening file for writing!\n";
Filename.clear();
}