summaryrefslogtreecommitdiff
path: root/lib/Support/YAMLTraits.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/YAMLTraits.cpp')
-rw-r--r--lib/Support/YAMLTraits.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Support/YAMLTraits.cpp b/lib/Support/YAMLTraits.cpp
index 42bff96f73..599a369558 100644
--- a/lib/Support/YAMLTraits.cpp
+++ b/lib/Support/YAMLTraits.cpp
@@ -689,6 +689,17 @@ StringRef ScalarTraits<StringRef>::input(StringRef Scalar, void *,
Val = Scalar;
return StringRef();
}
+
+void ScalarTraits<std::string>::output(const std::string &Val, void *,
+ raw_ostream &Out) {
+ Out << Val;
+}
+
+StringRef ScalarTraits<std::string>::input(StringRef Scalar, void *,
+ std::string &Val) {
+ Val = Scalar.str();
+ return StringRef();
+}
void ScalarTraits<uint8_t>::output(const uint8_t &Val, void *,
raw_ostream &Out) {