This was a bug that meant invalid dot files were produced due to MemCopy
layers having a name including "->".
Change-Id: If9f5b13d433f6a7328bf0ad8c7ec89cdce2462b0
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
#include "DotSerializer.hpp"
#include <boost/assert.hpp>
+#include <boost/algorithm/string/replace.hpp>
#include <sstream>
#include <cstring>
}
return ss.str();
}
+
+std::string Escape(std::string s)
+{
+ boost::replace_all(s, "<", "\\<");
+ boost::replace_all(s, ">", "\\>");
+ return s;
+}
+
} //namespace
}
for (auto & content : m_Contents)
{
- ss << content;
+ ss << Escape(content);
ss << "\\l";
}
ss << "}\"";