diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-11-19 17:28:21 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-11-19 17:28:21 +0000 |
commit | 48e018a31460588b783d441a20746b92228bf826 (patch) | |
tree | 44bd7c19960b301ef97d2a574200928ada18b399 /llvm/lib/Support/YAMLTraits.cpp | |
parent | 2918b670292c2c1236e386f1b0a882bc6ee4f786 (diff) | |
download | bcm5719-llvm-48e018a31460588b783d441a20746b92228bf826.tar.gz bcm5719-llvm-48e018a31460588b783d441a20746b92228bf826.zip |
YAML I/O - Added default trait support for std:string. Making another attempt at this, this time doing a clean build on Linux, and running the LLVM, clang, and extra tests, to try to make sure there's no problems.
llvm-svn: 195134
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 42bff96f73b..599a369558d 100644 --- a/llvm/lib/Support/YAMLTraits.cpp +++ b/llvm/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) { |