Revert "YAMLIO: Fix string quoting logic." (r190469)
It was turning the buildbots red.
llvm-svn: 190480
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp
index d0e4b1b..cf19509e 100644
--- a/llvm/lib/Support/YAMLTraits.cpp
+++ b/llvm/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;
}