summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptToken.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-05-08 08:47:37 +0000
committerMartin Storsjo <martin@martin.st>2018-05-08 08:47:37 +0000
commit4021cee996f75e8f591991e53180d1d29dfd20d6 (patch)
tree4e932f1e242fc9ae996064de1f6995b0ce322717 /llvm/tools/llvm-rc/ResourceScriptToken.cpp
parent5e6e6cc7213616038cc781ca21d9c532beb8e220 (diff)
downloadbcm5719-llvm-4021cee996f75e8f591991e53180d1d29dfd20d6.tar.gz
bcm5719-llvm-4021cee996f75e8f591991e53180d1d29dfd20d6.zip
[llvm-rc] Don't strictly require quotes around external file names
Regardless of what docs may say, existing resource files in the wild can use this syntax. Rename a file used in an existing test, to make it usable for unquoted paths. Differential Revision: https://reviews.llvm.org/D46511 llvm-svn: 331747
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptToken.cpp')
-rw-r--r--llvm/tools/llvm-rc/ResourceScriptToken.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptToken.cpp b/llvm/tools/llvm-rc/ResourceScriptToken.cpp
index 7bbf0d16f04..fc0a0e91845 100644
--- a/llvm/tools/llvm-rc/ResourceScriptToken.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptToken.cpp
@@ -281,13 +281,14 @@ bool Tokenizer::canStartIdentifier() const {
assert(!streamEof());
const char CurChar = Data[Pos];
- return std::isalpha(CurChar) || CurChar == '_';
+ return std::isalpha(CurChar) || CurChar == '_' || CurChar == '.';
}
bool Tokenizer::canContinueIdentifier() const {
assert(!streamEof());
const char CurChar = Data[Pos];
- return std::isalnum(CurChar) || CurChar == '_';
+ return std::isalnum(CurChar) || CurChar == '_' || CurChar == '.' ||
+ CurChar == '/' || CurChar == '\\';
}
bool Tokenizer::canStartInt() const {
OpenPOWER on IntegriCloud