summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'QA/Checker/IO.cpp')
-rw-r--r--QA/Checker/IO.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/QA/Checker/IO.cpp b/QA/Checker/IO.cpp
index d9eadd6..41fe5d3 100644
--- a/QA/Checker/IO.cpp
+++ b/QA/Checker/IO.cpp
@@ -6,6 +6,7 @@
#include <QA/Checker/IO.h>
+#include <algorithm>
#include <iostream>
std::ostream& operator<<(std::ostream& os, const Swift::ByteArray& s) {
@@ -55,3 +56,10 @@ std::ostream& operator<<(std::ostream& os, const std::vector<size_t>& s) {
os << std::endl;
return os;
}
+
+bool operator==(const Swift::ByteArray& a, const Swift::ByteArray& b) {
+ if (a.size() != b.size()) {
+ return false;
+ }
+ return std::equal(a.begin(), a.end(), b.begin());
+}