Commit 8ce950a3 authored by Dr. Michael Petter's avatar Dr. Michael Petter

even got function names right

parent 8e9e5cfa
......@@ -356,17 +356,24 @@ void executeFixpointAlgorithm(Module const& M) {
std::error_code ErrInfo;
llvm::raw_fd_ostream Result(OutputFilename.c_str(),ErrInfo,llvm::sys::fs::F_None);
StringRef sofar("");
Result << "{\n";
for (auto const& [key, node]:nodes){
Result << " \"" << *node.basic_block << "\"" << ":{\n";
StringRef name = (*node.basic_block).getParent()->getName();
if (!sofar.equals(name)) {
if (sofar.size()!=0) Result << "},\n";
Result << "\""<< name <<"\":{\n";
sofar=name;
}
Result << " \"" << (*node.basic_block).getName() << "\"" << ":{\n";
node.state.printOutgoing(*node.basic_block,Result,4);
Result << " }" ;
if (y++ != nodes.size()-1)
Result <<",";
Result<<"\n";
}
Result << "}\n";
Result << "}}\n";
Result.flush();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment