diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/armnnUtils/DotSerializer.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/armnnUtils/DotSerializer.cpp b/src/armnnUtils/DotSerializer.cpp index b3d3d103af..1f36cf73ae 100644 --- a/src/armnnUtils/DotSerializer.cpp +++ b/src/armnnUtils/DotSerializer.cpp @@ -6,6 +6,7 @@ #include "DotSerializer.hpp" #include <boost/assert.hpp> +#include <boost/algorithm/string/replace.hpp> #include <sstream> #include <cstring> @@ -23,6 +24,14 @@ std::string Indent(int numSpaces) } return ss.str(); } + +std::string Escape(std::string s) +{ + boost::replace_all(s, "<", "\\<"); + boost::replace_all(s, ">", "\\>"); + return s; +} + } //namespace @@ -151,7 +160,7 @@ NodeContent::~NodeContent() } for (auto & content : m_Contents) { - ss << content; + ss << Escape(content); ss << "\\l"; } ss << "}\""; |