Commit 29dd3e3f authored by Junfeng Dong's avatar Junfeng Dong Committed by Robert Kimball

Fix visualize tracing file name on Windows. (#2643)

parent 3f8f3ab4
......@@ -51,7 +51,16 @@ public:
m_pass_list.push_back(pass_base);
if (m_visualize || m_serialize)
{
#ifdef _WIN32
/* MSVC produce a human-readable type name like class ngraph::pass::LikeReplacement
* by typeid(T).name(). Later ofstream doesn't accept it as a valid file name.
*/
std::string str = typeid(T).name();
auto pos = str.find_last_of(":");
m_pass_names.push_back(str.substr(pos + 1));
#elif defined(__linux) || defined(__APPLE__)
m_pass_names.push_back(typeid(T).name());
#endif
}
}
......
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