diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-09-11 01:59:32 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-09-11 01:59:32 +0000 |
commit | 90c782a9ca9bc9325e9a1f075890311c15dfeb0e (patch) | |
tree | 04d5d4e4616e94efbde0dc511e09d2f1b83ef0e7 /lib/Support/YAMLTraits.cpp | |
parent | abaa85d88d13f6efa99c61d206155678ccd5f118 (diff) | |
download | llvm-90c782a9ca9bc9325e9a1f075890311c15dfeb0e.tar.gz llvm-90c782a9ca9bc9325e9a1f075890311c15dfeb0e.tar.bz2 llvm-90c782a9ca9bc9325e9a1f075890311c15dfeb0e.tar.xz |
Revert "YAMLIO: Fix string quoting logic." (r190469)
It was turning the buildbots red.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/YAMLTraits.cpp')
-rw-r--r-- | lib/Support/YAMLTraits.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Support/YAMLTraits.cpp b/lib/Support/YAMLTraits.cpp index d0e4b1b902..cf19509ee8 100644 --- a/lib/Support/YAMLTraits.cpp +++ b/lib/Support/YAMLTraits.cpp @@ -509,16 +509,8 @@ void Output::endBitSetScalar() { void Output::scalarString(StringRef &S) { this->newLineCheck(); - - if (S.empty()) { - // Print '' for the empty string because leaving the field empty is not - // allowed. - this->outputUpToEndOfLine("''"); - return; - } - if (!strchr("'`@\"", S.front()) && S.find('\n') == StringRef::npos) { - // Plain string cannot start with double quote or single quote. Backquote - // and atsign are reserved characters. Newline is not allowed. + if (S.find('\n') == StringRef::npos) { + // No embedded new-line chars, just print string. this->outputUpToEndOfLine(S); return; } |