summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 6a0f08690e7..c66457ca066 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -139,6 +139,16 @@ raw_ostream &raw_ostream::write_hex(unsigned long long N) {
return *this;
}
+raw_ostream &raw_ostream::write_uuid(const uuid_t UUID) {
+ for (int Idx = 0; Idx < 16; ++Idx) {
+ *this << format("%02" PRIX32, UUID[Idx]);
+ if (Idx == 3 || Idx == 5 || Idx == 7 || Idx == 9)
+ *this << "-";
+ }
+ return *this;
+}
+
+
raw_ostream &raw_ostream::write_escaped(StringRef Str,
bool UseHexEscapes) {
for (unsigned char c : Str) {
OpenPOWER on IntegriCloud