summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'QA/Checker/IO.cpp')
-rw-r--r--QA/Checker/IO.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/QA/Checker/IO.cpp b/QA/Checker/IO.cpp
index 4945791..2e14589 100644
--- a/QA/Checker/IO.cpp
+++ b/QA/Checker/IO.cpp
@@ -21,3 +21,17 @@ std::ostream& operator<<(std::ostream& os, const Swift::ByteArray& s) {
os.flags(oldFlags);
return os;
}
+
+std::ostream& operator<<(std::ostream& os, const Swift::SafeByteArray& s) {
+ std::ios::fmtflags oldFlags = os.flags();
+ os << std::hex;
+ for (Swift::SafeByteArray::const_iterator i = s.begin(); i != s.end(); ++i) {
+ os << "0x" << static_cast<unsigned int>(static_cast<unsigned char>(*i));
+ if (i + 1 < s.end()) {
+ os << " ";
+ }
+ }
+ os << std::endl;
+ os.flags(oldFlags);
+ return os;
+}