summaryrefslogtreecommitdiff
path: root/lib/Support
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
commitc657a09ea63f3b7a951c0d2fe3ab7d06d4fce8d3 (patch)
treef65103b3ea6d77ebc8ab09cbe2ecb993c100a584 /lib/Support
parentb0ee2374cea63f2edcc1bf092f6f46f3cc60da62 (diff)
downloadllvm-c657a09ea63f3b7a951c0d2fe3ab7d06d4fce8d3.tar.gz
llvm-c657a09ea63f3b7a951c0d2fe3ab7d06d4fce8d3.tar.bz2
llvm-c657a09ea63f3b7a951c0d2fe3ab7d06d4fce8d3.tar.xz
Revert "YAMLIO: Encode ambiguous hex strings explicitly"
This reverts commit r205839. It broke several tests in lld. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/YAMLTraits.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Support/YAMLTraits.cpp b/lib/Support/YAMLTraits.cpp
index 3b4bb7dbc9..38f3ec7c7f 100644
--- a/lib/Support/YAMLTraits.cpp
+++ b/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);