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 | 33ae7cea9fc7bb880fb8169e6f6848acddb36fe6 (patch) | |
tree | 9f77989f46360786560eb9f8bc72d19775889de6 /llvm/lib/Support/YAMLTraits.cpp | |
parent | 46c9950f4877b85dcbf7ef09b6be049d89eb3406 (diff) | |
download | bcm5719-llvm-33ae7cea9fc7bb880fb8169e6f6848acddb36fe6.tar.gz bcm5719-llvm-33ae7cea9fc7bb880fb8169e6f6848acddb36fe6.zip |
Revert "YAMLIO: Fix string quoting logic." (r190469)
It was turning the buildbots red.
llvm-svn: 190480
Diffstat (limited to 'llvm/lib/Support/YAMLTraits.cpp')
-rw-r--r-- | llvm/lib/Support/YAMLTraits.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp index d0e4b1b902d..cf19509ee88 100644 --- a/llvm/lib/Support/YAMLTraits.cpp +++ b/llvm/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; } |