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
diff --git a/lib/Support/YAMLTraits.cpp b/lib/Support/YAMLTraits.cpp
index d0e4b1b..cf19509 100644
--- a/lib/Support/YAMLTraits.cpp
+++ b/lib/Support/YAMLTraits.cpp
@@ -509,16 +509,8 @@
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;
}