summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/YAMLTraits.cpp
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2014-04-09 14:35:17 +0000
committerFilipe Cabecinhas <me@filcab.net>2014-04-09 14:35:17 +0000
commit2c4e8ae0fd524f164e3d2bfc48fbb6925da2f6cb (patch)
treef13f9f7308211d998ca9f1588d435d3c319b5c55 /llvm/lib/Support/YAMLTraits.cpp
parentfd0bf5d6e5c258367811befde2d13111dc4ccf40 (diff)
downloadbcm5719-llvm-2c4e8ae0fd524f164e3d2bfc48fbb6925da2f6cb.tar.gz
bcm5719-llvm-2c4e8ae0fd524f164e3d2bfc48fbb6925da2f6cb.zip
Revert "YAMLIO: Encode ambiguous hex strings explicitly"
This reverts commit r205839. It broke several tests in lld. llvm-svn: 205857
Diffstat (limited to 'llvm/lib/Support/YAMLTraits.cpp')
-rw-r--r--llvm/lib/Support/YAMLTraits.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp
index 3b4bb7dbc97..38f3ec7c7f9 100644
--- a/llvm/lib/Support/YAMLTraits.cpp
+++ b/llvm/lib/Support/YAMLTraits.cpp
@@ -561,11 +561,8 @@ void Output::scalarString(StringRef &S) {
this->outputUpToEndOfLine("''");
return;
}
- bool isOctalString = S.front() == '0' &&
- S.find_first_not_of('0') != StringRef::npos &&
- !S.startswith_lower("0x");
if (S.find_first_not_of(ScalarSafeChars) == StringRef::npos &&
- !isspace(S.front()) && !isspace(S.back()) && !isOctalString) {
+ !isspace(S.front()) && !isspace(S.back())) {
// If the string consists only of safe characters, print it out without
// quotes.
this->outputUpToEndOfLine(S);
OpenPOWER on IntegriCloud