summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-19 11:51:05 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-19 11:51:05 +0000
commitf34eea5aa1bcd7182afd3f96b30344e6045f5d7b (patch)
treeb2d14ecc5a9d97655db2ff074c8f227061f5e85e
parent4feda80a438420d16378f0092596a833c78ba176 (diff)
downloadbcm5719-llvm-f34eea5aa1bcd7182afd3f96b30344e6045f5d7b.tar.gz
bcm5719-llvm-f34eea5aa1bcd7182afd3f96b30344e6045f5d7b.zip
[YAML] Always double quote UTF-8 characters
llvm-svn: 321068
-rw-r--r--llvm/include/llvm/Support/YAMLTraits.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h
index 83b097a199d..3ee556d7533 100644
--- a/llvm/include/llvm/Support/YAMLTraits.h
+++ b/llvm/include/llvm/Support/YAMLTraits.h
@@ -549,9 +549,9 @@ inline QuotingType needsQuotes(StringRef S) {
// range.
if (C <= 0x1F)
return QuotingType::Double;
- // C1 control block (0x80 - 0x9F) is excluded from the allowed character
- // range.
- if (C >= 0x80 && C <= 0x9F)
+
+ // Always double quote UTF-8.
+ if (C & 0x80 != 0)
return QuotingType::Double;
// The character is not safe, at least simple quoting needed.
OpenPOWER on IntegriCloud