summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index b9989371f5e..4a2d6d20951 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -139,6 +139,11 @@ raw_ostream &raw_ostream::operator<<(long long N) {
return *this;
}
+raw_ostream &raw_ostream::operator<<(std::error_code EC) {
+ return *this << EC.message() << " (" << EC.category().name() << ':'
+ << EC.value() << ')';
+}
+
raw_ostream &raw_ostream::write_hex(unsigned long long N) {
llvm::write_hex(*this, N, HexPrintStyle::Lower);
return *this;
OpenPOWER on IntegriCloud