diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-10-24 13:36:58 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-10-24 13:36:58 +0000 |
commit | e38e57206fd4da7ac721608a229bf802d6fe23b9 (patch) | |
tree | 842ed12bcacf17dff718021ae41eab98cc8bf968 /llvm/lib/Support/YAMLTraits.cpp | |
parent | 7edb87a92c91368169bc79bca30806a36b1b5893 (diff) | |
download | bcm5719-llvm-e38e57206fd4da7ac721608a229bf802d6fe23b9.tar.gz bcm5719-llvm-e38e57206fd4da7ac721608a229bf802d6fe23b9.zip |
Added std::string as a built-in type for mapping.
llvm-svn: 193344
Diffstat (limited to 'llvm/lib/Support/YAMLTraits.cpp')
-rw-r--r-- | llvm/lib/Support/YAMLTraits.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp index 19eaed1ac7a..86efe6e4d73 100644 --- a/llvm/lib/Support/YAMLTraits.cpp +++ b/llvm/lib/Support/YAMLTraits.cpp @@ -648,6 +648,17 @@ StringRef ScalarTraits<StringRef>::input(StringRef Scalar, void *, 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) { // use temp uin32_t because ostream thinks uint8_t is a character |