Unverified Commit 2069823f authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Migrate #2864 (#2901)

* Migrate #2864

* Remove extra changes
parent 8728d7cb
......@@ -160,19 +160,18 @@ void pass::Manager::run_passes(shared_ptr<Function> func, bool transitive)
std::string index_str = std::to_string(index);
index_str = std::string(num_digits_in_pass_index - index_str.length(), '0') + index_str;
auto base_filename = f_array.at(0)->get_name() + std::string("_") + index_str +
std::string("_") + m_pass_names.at(index) + std::string(".");
std::string("_") + m_pass_names.at(index);
if (m_visualize)
{
pass::VisualizeTree vt(base_filename + pass::VisualizeTree::get_file_ext());
pass::VisualizeTree vt(base_filename);
vt.set_ops_to_details(get_state().get_visualize_tree_ops_map());
vt.run_on_module(f_array);
}
if (m_serialize)
{
// no "." in the extension
pass::Serialization st(base_filename + "json");
pass::Serialization st(base_filename + ".json");
st.run_on_module(f_array);
}
}
......
This diff is collapsed.
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